I just finished the data structures and algorithms course in school , I took it during the summer so 6wks course vs a 16 wk course during the regular semester. So not only was the course hard but it was really really really fast. My question is what do I need to know about data structures in the real world? I understand what they do and how they work, for the most part, but I had a real tough time coding them , I wouldn't be able to write the code for a binary tree class or a balanced tree class from scratch .... Is that bad? should I retake it , or is knowledge of how they work sufficient, without being able to write the classes from scratch?
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.
Yes, you need to know about data structures and algorithms. They are the fundamental building blocks of programs. Anyone can learn the syntax of a programming language, but to actually write meaningful programs, you have to understand how to use data structures and algorithms.
Luckily, you won't be implementing these data structures usually, since there are libraries for them in every language. So no, just because you had a hard time writing a self-balancing tree doesn't mean you're going to fail as a programmer. But learning to solve hard problems in code is a very useful skill, so take every opportunity you can to develop that skill. That includes writing self-balancing trees. :)
A typical programmer generally doesn't need to be able to write data structures and algorithms from scratch, he/she just needs to know the strengths and weaknesses of those they do use from whichever API.
"typical" and "generally" are the important words here - sometimes the available APIs don't provide the required data structure or algorithm, sometimes the task requires a really complex data structure or algorithm not typically found in a common API and some programmers regularly perform tasks that require the use of more complex data structures and algorithms. Except for the latter case, you should be fine just copying-and-pasting / slightly modifying code found on the internet.
That said, a binary tree is not a complex data structure, so I'd be a little concerned if I were you. Any programmer should be able to code one up successfully (though I'm not sure how many would actually be able to). However, it sounds like you're reasonably new to programming, so don't worry too much. The knowledge will come, as long as you keep programming and learning about programming.
A balanced tree is more about memorizing some rules to keep it balanced, so I wouldn't worry about that one too much.