Data Structure and Algorithms
- What is 1 of the more important things you should consider when deciding which data structure is best suited to solve a particular problem?
The BigO equation is the number 1 things you should consider when selecting the data structure to solve a problem. This is because each data structure stores and interacts data differently, each with pros and cons that can give a particular data structure an edge and have a low BigO factor (if I’m staying that right).
- How can we ensure that we’ll avoid an infinite recursive call stack?
Recursive calls call on themselves, so it is easy to get into an infinite loop. To prevent an infinite loop, ensure your recursive call has two parts, the base case and recursive case. Conditional statement inside the loop (i.e. if/else statements inside loops) can be set up to handle the base case when conditions to excite the loop are met, and the recursive case which performs the function in the loop.
Things I want to know more about