Computer Science EngineeringHard
The postfix form of the infix expression a + b * c - d is
- A. ab+c*d-
- B. abc+*d-
- C. a+bc*d-
- D. abc*+d-
Correct answer: D. abc*+d-
Multiplication binds tighter, giving bc*, then a+ and finally subtracting d left to right.
Practise more Algorithms, Data Structures & Programming (ISRO CS) questionsAlgorithms, Data Structures & Programming (ISRO CS): notes and key points
More Algorithms, Data Structures & Programming (ISRO CS) questions
- The length of a longest common subsequence of ABCBDAB and BDCABA is
- The 0/1 knapsack problem with n items and capacity W is solved by dynamic programming in time
- A red-black tree with n internal nodes has height at most
- The Floyd-Warshall all-pairs shortest path algorithm runs in time
- What does f(4795) return for int f(int n){ return n==0 ? 0 : n%10 + f(n/10); }
- A union-find structure with union by rank and path compression supports each operation in amortized time