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.
If a + (1/a) = 2, then find the value of (a5 + a3 + 6)/(7a – 5).
Find the values of x and y if 0.1x + 0.05y = 20 and 0.3(x+2) +0.6y = 66.
125 sweets were distributed equally among children in such a way that the number of sweets received by each child is 20% of the total number of children...
(p + 3) 2 + (q – 7) 2 + (r + 4)2 = 0, then find the value of p + q – r.
If x = 99, then the value of x5 - 100x4 + 100x3 - 100x2 + 100x - 1 is
4, 10, 19, 30, 43, ?
- If x² - 2x + 1 = 0, then find the value of (x³ + x⁻³)(x + x⁻¹).
√(92×8 ×52+700) = ?

In a class of 70 students and 25 teachers, each student got gifts that were 20% of total number of students and each teacher got gifts that were 10% of ...