Start learning 50% faster. Sign in now
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.
A’ and ‘B’ alone can do a certain work in 20 days and 30 days, respectively. Both started the work together but after ‘x’ days ‘A’ left th...
‘R’ and ‘S’ can complete an assignment in 72 days and 90 days respectively while ‘R’, ‘S’ and ‘T’ together can complete the same ass...
18 women can do piece of work in 12 days. 12 men can do the same piece of work in 9 days. Find in how many days will 8 men and 8 women complete that work?
'Q' is 20% less efficient than 'P' and 'R' is 60% more efficient than 'P'. If 'Q' takes 20 more days than 'R' to complete the same work, then find the t...
Sam alone can complete a work in 60 days. Arun is three times as efficient as Sam. Find the percentage of work completed by Sam and Arun together in 15 ...
Choose the statements that correctly show two workers taking 6 hours and 9 hours to complete a task, respectively.
A and B can each finish a task in 32 days and 36 days respectively. They begin the task together, but after 12 days, A leaves. How long will it take for...
Anil and Ashish receive Rs.1200 for work of 8 days. If Anil is 5 times efficient than Ashish, then find the daily wage received by Ashish.
A and B individually can complete the work in 20 days and 30 days respectively. If the time taken by C alone to complete the work is 1.25 times the time...
‘M’ is 60% more efficient than ‘N’. ‘N’ started the work alone and worked for 20 days and after that ‘N’ is replaced by ‘M’. If the ...