- Discuss the concept of recursion in programming. How does it work, and in what scenarios might recursion be more advantageous than iterative solutions?
- Explain the difference between time complexity and space complexity in algorithms. Why is it important to consider both when evaluating the efficiency of an algorithm?
- What distinguishes linear data structures from non-linear data structures? Provide examples and use cases where one might be preferred over the other.
- Discuss difference between linear and binary search
- In your own words explain the following data structures:
- Linked List
- Stack
- Queues
Group members: Tumelo, Lindokuhle, Wesley
1)Its a process whereby a function calls itself until a certain condition is met. scenarios that would be more advantageous would be is where readability is important, e.g. Tree structures
2)Time complexity is the amount time an algorithm takes to run its execution. Space complexity the amount of space it takes to execute a function.
3)linear data structures e.g.arrays,linked lists, stack follow a sequential order while non-linear data structures is more complex and have hierachical relationships
4)linear search:
5)