hello friends, given an expression we have to remove the
unwanted brackets in that expression.
Eg : (a+b) ---> a+b
(a+b)*(c)-----> (a+b)*c. Please mail me if you know
the logic. My mail id is : saravana6m@gmail.com.
Thank you in advance :-)
Answer / arjun
hello there,
the logic i quite simple and such questions are give just to
confuse us.
push the given string in a stack and while popping out
ignore the bracket PAIR which contain
i) a lone variable in between
ii) does not contain any operator before or after the bracket.
for eg. if (a+b)*c is there then bracket must not be ignored.
thanks
| Is This Answer Correct ? | 9 Yes | 14 No |
Write code for the multiplication of COMPLEX numbers?
can we declare an object of a class in another class?(assume both class as public classes)
main(){int a=5,b 10,c=2, d;a=b c;d=++a=(--c)*2; printf("%d%d%d%d,a,b,c,d; return o;}
write a program in c++ to scramble a bmp image file using a scramble key 0x7c and an XOR logic. print out the original image, the scrambled image and the program. Note: the first 24bytes of a bmp file contain the header information of the file.
write a c program, using for loop, that accepts and odds two numbers. The output must be the sum and the addens. This should be repeated 5 times while the first number is decremented by one and the second number is incremented by 1.
output for printf("printf");
Code for Easily Using Hash Table?
write a function – oriented program that calculates the sum of the squares from 1 to n. thus, if the input is 3, the output is 14
Write A C++ Program To Input A Number Between 20 To 99 And Display Its Numbername?
Given 1 to n distinct random number of which n+1th element was duplicated. How do find the duplicate element and explain the time complexity of the algorithm.
How reader and writer problem was implemented and come up with effective solution for reader and writer problem in case we have n readers and 1 writer.
Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?