# Data Structures Curriculum

Somehow the website that I set up a couple of years ago for my Computer Science courses ranks fairly well when a teacher searches for data structures curriculum. It wasn’t something I set out to do, but I get 3 or 4 emails every month out of the blue from teachers asking what I do in my data structures course. And that’s pretty cool.

But rather than responding with brief responses, I figured I’d write up a better response and post it online.

### Data Structures in High School

Years ago there was an AP-AB computer science course in addition to the existing AP-A course. AB was a second year course that added more data structures to what was taught in AP-A.

Even though it’s no longer a formal AP course, I still follow that basic model. We cover Stacks, Queues, pQueues, Maps, Sets, Trees, Graphs; and then throw in some extra stuff like RegEx and Big-O.

### Less Labs, More Projects!

AP-A is a very lab heavy course. Lots of topics to cover, and lots of small labs to do. There’s not much time for larger projects between August and the exam in mid-May. We do a few, but it’s not the focus.

Since the students in data structures have made it through that course I try to make this course as project heavy as possible. We try to actually build fully working projects rather than just small pieces.

Yes, we do some labs. But typically each unit will have 3 or 4 labs compared to the 12 to 20 that we might have done in AP-A.

My normal pattern is to intro a topic with the students following along, have them do a couple of labs, and then move on into a larger project.

### Textbook and Curriculum

I’m not a textbook person. Students are already sitting at a computer connected to the internet. Why, when they need a reference, would they turn through pages? We have a textbook. It never gets used. If a student needs to look something up they hit up Google and usually wind up on Stack Overflow.

Our district does buy curriculum from A+ Computer Science. That takes care of slides, which I rarely use; quizzes; tests; and some labs. We buy it mostly for the AP-A curriculum, but the data structures stuff is good too.

Side story… My first year at this school we had a class set of textbooks and the kids had online access at home. The textbooks were on each desk, but very rarely got opened. I asked at the end of the year how many students had used the online textbook. 3 out of about 120 students had take the access code and created an account. 1 of those 3 logged in more than once, and he logged in twice.

This year the textbooks are in the storeroom and we didn’t get online access codes.

### Unit Sequence

I’ve settled on a sequence that works fairly well, and builds on itself as the year progresses. It’s certainly not the only sequence, and probably not even the best one. But it works well in my classroom.

1. Review from AP-A – Mostly ArrayList and matrices
2. Iterators
3. Reading files with Scanner
4. Sets
5. Maps
6. Stacks
7. Queues and Priority Queues
9. Hash Tables
10. Trees
11. Heaps
12. Graphs

The review unit does have quite a few labs, although most of them are repeats from their AP-A year.

For the other units there’s at least one project per unit.

As an example, we’re currently working on Stacks. We did the typical Stack labs where you check whether the syntax in a string is valid and created a postfix solver. Now everyone is building a program that creates a random maze using a recursive backtracking algorithm. It’s a great use for a stack, plus a pretty cool project when it’s done.

The extra stuff like RegEx and Big-O is mixed in through the year. I’ve got about a week to fill between now and the Thanksgiving break which I think is just about perfect to do a quick intro to RegEx.

### Not just Java

One of my goals for my data structures students is to get them in something other than Java. And I’ve got two ways that I do this.

#### End of year project

Once we’re finished covering the data structures we need to cover we switch languages and make a big project.

Last year we used Python and Pygame to make a retro game. It was their call what game they made, but it had to be something old. We had lots of Mario Brothers, Dig Dug and Donkey Kong.

The idea was to get them to create something in another language and Python has a pretty low entry barrier, especially to students that have programmed before.

This year I’m planning on building web browser games in JavaScript, mostly to keep it interesting for me. Plus, browser games would be much easier to share with other students.

#### 20% Days

Every Friday we also do a 20% day. It’s something credited to Google where their employees had 20% of their on clock time to work on projects that are interesting to them, even if that wasn’t what’s on their to do list at work. In education circles it’s sometimes called Genius Hour, but the idea is the same.

At the beginning of the year every student comes up with a project idea. Something they want to build that is at least somehow related to computer science. And I use a very loose definition of computer science. I’ve got students building web sites, 3D animations, Android and iPhone apps and playing around with Lego and Sphero robots.

Almost no one actually finishes this project though. Most students come up with a project that’s way too complicated to go from novice to finished in the 36 or so Fridays that we have during the year. I think that’s actually better though. It really pushes them and gets everyone thinking way above what they would in the normal classroom environment.

As an side benefit, Fridays also work really well as a catch up day for those students that occasionally need a little extra time on a given assignment.