Question
Which data structure is most suitable for implementing
recursion?Solution
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.
The Treaty of Mangalore was signed between Tipu Sultan and the British East India Company in the year _______.
Chhattisgarh does NOT share its boundary with:
What is the full form of NPCI?
The government of which of the following states created a draft policy in 2022 for senior citizens on the basis of article 41, which aims to form a dire...
What is the name of the Election Commission of India’s portal for electoral integrity?
Which of the following banks is the TV broadcast sponsor for Indian Team In Asian Games?
Nobel Prize for economics 2022 was awared for the research in which of the following field?
When was Khandesh merged into the Mughal empire by Akbar?
FRONX is a car by a trusted Car Brand, it is manufactured in which of the following countries?
As per RBI committee for asset reconstruction companies (ARCs), for accounts above_________, two bank-approved external valuers should carry out a valua...