A stack is the most suitable data structure for implementing recursion. This is because recursive calls need to store the state of the current function execution before jumping into the next function call. Stacks follow the Last In, First Out (LIFO) principle, which perfectly suits the recursive function call structure. Why Other Options are Wrong: b) A queue follows First In, First Out (FIFO), which doesn’t support the nature of recursion. c) Linked lists can be used for dynamic memory but are not suitable for managing function calls in recursion. d) Arrays have a fixed size and do not inherently support LIFO behavior. e) Hash tables are for storing key-value pairs and have no role in recursion.
How is F related to H?
Four from the following five are similar in a certain way and forms a group. Find out the one who does not belong to that group?
If ‘A % B’ means ‘A is the daughter of B’, ‘A & B’ means ‘A is the wife of B’, and ‘A # B’ means ‘A is the son of B’, then how i...
If K is the only son of Q’s sister. L is the only daughter-in-law of D. Q is married to L. Y is the daughter of D, who is the grandmother of I, who is...
How O related to Y?
How is W related to U?
Who is the son of U?
If F$E@I*G&H&J then how is H related to E?
If, ‘A#B’ means A is husband of B ‘A@B’ means A is sister of B ‘A$B’ means A is daughter of B ‘A%B’ means A is son of B In expression Y%...
Who among the following is married to F?