top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Remove extra brackets in a mathematical expression: i.e. for Given input: ((A+B)*C), expected output is (A+B)*C

+1 vote
334 views
Remove extra brackets in a mathematical expression: i.e. for Given input: ((A+B)*C), expected output is (A+B)*C
posted Oct 24, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+4 votes

Can someone please write a C program to reverse "N" nodes of list. In the above question N= 3.
Program should be generic so it can work for any value assigned to N.

Input List => 1 2 3 4 5 6 7 8 9 10 11
Output List => 3 2 1 6 5 4 9 8 7 10 11
for N=3

Input List => 1 2 3 4 5 6 7 8 9 10 11
Output List => 4 3 2 1 8 7 6 5 9 10 11
for n=4

+3 votes

Given a 2d array, u need to sort the 2 diagonals independently.
And the elements in diagonal should remain in diagonal only.

INPUT =>
24 2 3 4 7

6 13 8 5 10

11 12 9 14 15

16 21 18 25 20

17 22 23 24 1

OUTPUT =>
1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

16 17 18 19 20

21 22 23 24 25

...