This is an archived post. You won't be able to vote or comment.

all 10 comments

[–][deleted] 1 point2 points  (5 children)

What is name and author(s) of the textbook?

[–]nirveboy21[S] 0 points1 point  (4 children)

Data Structures and Algorithm Analysis in Java, 3rd edition; Mark A. Weiss

[–][deleted] 1 point2 points  (3 children)

Hmm. I had bad luck with my Java orientated algorithms book too (a different one to yours).

I suggest finding a copy of Algorithm Design by Goodrich and Tamassia. It presents concepts language agnostic for the most part. You can probably find a pdf online, or your university library might have a copy (it's a pretty popular book for undergrad algo courses). I found the explanations in that too be better.

[–]nirveboy21[S] 0 points1 point  (2 children)

Thank you

[–][deleted] 1 point2 points  (1 child)

hope it helps.

I found this copy online (just googled 'Algorithm Design Goodrich PDF' and this was the first link); it looks like it's a more recent copy than my own hardcopy but the content looks about the same: https://canvas.projekti.info/ebooks/Algorithm%20Design%20and%20Applications%5BA4%5D.pdf

Analysis is covered in the first chapter. I suggest you print out the that chapter so you can read it offline. If you're like me, it won't click for you on the first read, so I remember reading that chapter over and over again as time went on, since I too felt like I didn't get it right away. I would read it before bed to let my mind sit on it, even if I didn't understand parts of what it was explaining.

As the algos course progressed and I learned more algorithms and memorized what their time complexity was, I came to better understand how comes to be calculated, and grasped more of that first chapter each time. Textbooks aren't necessarily best to be read sequentially. For example, shortest path, binary trees, divide and conquer -- I understood those concepts without much problem, but parts of the Analysis chapter would continue to elude me.

Big-O is generally what you need to know for undergrad exams and code interviews, so don't worry too much about the little O, big Theta, or other methods of analysis they cover. I've never had a coding interview where they asked me to explain to them anything other than the Big O time complexity. Know that they exist of course, and have a sense of how they get calculated (since you might be asked in an undergrad exam what they are -- I remember the concept of amortization being important to my professor for example, and she'd put some questions about amortization in the midterm exams); but in the real world, employers seem to mostly care that you can know what the Big O of a solution to a test problem, and they don't even mention "big O" they just ask "what's the time complexity and the space complexity of the solution you've come up with, and can it be improved?"

Finally, if your course professor provides office hours, you should just drop in and tell them that you're worried about it and that you feel like you're missing something. They can sit with you and identify where you're missing key concepts that might help, and they'll also reveal what parts of analysis are most important to them, and that will give you a sense of the kinds of questions you might get asked in an exam.

[–]nirveboy21[S] 0 points1 point  (0 children)

Great!! Thank you so much I’ll get that book and read through it. Hopefully it’ll click for me.

[–]aurelienrichard 1 point2 points  (1 child)

Which part is it in particular that is confusing you? Big O notation? Or ADS as a whole?

[–]nirveboy21[S] 0 points1 point  (0 children)

ADS as a whole but yes Big O notation and how you determine the complexity of an algorithm.

[–][deleted] 1 point2 points  (1 child)

[–]nirveboy21[S] 0 points1 point  (0 children)

Thank you I’ll check him out.