a) {[()]} b) ([ )] c) {( )} d) ...
View QuestionWhich of the following does the balancing symbols algorithm include?
a) balancing double quotes b) balancing single quotes c) balancing operators and brackets
View QuestionWhich is the most appropriate data structure for applying balancing of symbols algorithm?
a) stack b) queue c) tree d) graph Answer: a Explanation: ...
View QuestionIn balancing parentheses algorithm, the string is read from?
a) right to left b) left to right c) ...
View QuestionWhich application of stack is used to ensure that the pair of parentheses is properly nested?
a) Balancing symbols b) Reversing a stack c) Conversion of an infix to postfix expression d) ...
View QuestionWhat is the time complexity of balancing parentheses algorithm?
a) O (N) b) O (N log N) c) O (M log N) d) ...
View QuestionWhat is the number of moves required to solve Tower of Hanoi problem for k disks?
a) 2k – 1 b) 2k + 1 c) 2k + 1 d) ...
View QuestionWhich data structure can be used to test a palindrome?
a) Tree b) Heap c) Stack d) Priority queue Answer: c Explanation: ...
View QuestionWhich among the following is not a palindrome?
a) Madam b) Dad c) Malayalam d) Maadam Answer: d Explanation: A ...
View QuestionThe optimal data structure used to solve Tower of Hanoi is _________
a) Tree b) Heap c) Priority queue d) Stack Answer: d Explanation: The Tower of Hanoi ...
View Question