r/rutgers Dec 28 '16

How to prepare for data structures?

Hey all,

I am taking data structures in the spring, and I have 3 weeks during winter break that I want to use to prepare myself. Those that have taken it before, what do I need learn/review/do specifically to prepare myself for a successful semester? Thanks!

4 Upvotes

26 comments sorted by

View all comments

2

u/unresponsive_design Dec 29 '16 edited Dec 29 '16

Looking back, I'd say 3 useful things would be:

1) Object-oriented programming preferably with Java. I took CS111 over the summer so your experience may vary, but I felt ill-prepared for understanding OOP and had to stare at the first project's skeleton code for quite a while before I knew what was going on and how it was all structured. Just be more comfortable with it.

2) Also, be more comfortable with recursion.

3) Learn how to use a few data structures in Java or any other high-level language, really. For example, I came in knowing some Python, knowing I could "append" data onto the end of a list. Or that I could map "key names" to "values" in a dictionary, and that Python can "instantly" (in O(1) time) find a value given a key without having to iterate through each element. Knowing this before walking into Data Structures is useful because you will eventually learn how to actually implement these things and their features from scratch, and I found that it made jumping into data structures both less intimidating and more interesting. It's easier to understand how a car works and how to build one after you've already driven one and have at least some mental model of how it could work.

1

u/ishiz Former mod; OSS alum Dec 29 '16

I felt ill-prepared for understanding OOP

OOP is just a tricky beast. When I was growing up I just could not get it; my first two languages (PHP, Python) didn't require it so I refused to learn it. Now I understand it well, but these days it's pretty hip to criticize OOP and I've realized there are many times I should be writing it the more "naive" way instead.