How Important Is It to Memorize Time Complexities for Data Structures?
Asked by
CuriousCoder42
I'm working on understanding data structures and their time complexities, but I'm torn between memorizing them and actually grasping how they function. I feel like memorization could help me answer questions more quickly and understand their use cases better. What time complexities should I focus on for different data structures? Should I know about the best, average, and worst cases for operations like insertion, lookup, and deletion? Also, is the best case even relevant, or is that something we typically overlook?
Answers
Remember, the goal is to reason about your algorithms, not just memorize stuff you might never use. Knowing complexities without understanding their applications isnโt very useful. Itโs better to understand how they work than to simply have them memorized.
Reply to this answer
Understanding why data structures have certain complexities makes it easier to remember them by relating them to one another. Using memorization techniques like mnemonics can help too, but just connecting the concepts naturally also works well. Itโs all about building those associations!
Reply to this answer
Add your answer
Answers are reviewed before publication.
CareerChanger: Exactly! I want to make flashcards to test my understanding now, as I'm trying to switch careers. Data structures and algorithms are crucial for interviews, and I want to be prepared.