Pancakes and playlists

As is true about every first week of every block at CC,  any time you have any interaction with anyone not in your class, they will 99% of the time ask you, “What class are you taking this block?” This week, when a lot of my non-computer science friends ask me, and I say “Data Structures and Algorithms,” I see their eyes gloss over or I receive a very un-interested response. I get it; the title is rather daunting and I definitely associate “algorithms” with my painful 8th-grade algebra class, which I would rather not re-live. But it’s honestly really cool to learn about and it’s also super important to know for computer science majors, which is why I was excited to take this class. 

In short, there are a variety of data structures that we use to store information. Each data structure is useful in different contexts. Algorithms similarly must be analyzed for correctness and efficiency in one’s computer science program. Overall, the way we design our programs in our studies and in our future careers will be most powerful and efficient with the knowledge and tools this class provides us. In my Computer Science 2 class, we learned the fundamentals of both data structures and algorithms, and we are building off of that knowledge in this class. 

At the risk of not doing justice to the complexity of what we are learning, I will provide an analogy for an assignment we are working on: queues and stacks. On many popular music applications, you can queue songs to play next. The first song you queue will be the first song to play. The same idea applies to the idea of a queue as a data structure. At IHOP the pancake at the top of their short stack is the last one off the griddle. The same concept applies to stacks. If you were a cook at IHOP implementing a queue instead of a stack would be silly; it would require you to take pancakes off the griddle and place them elsewhere until the last pancake was cooked then you could re-stack them so that the first pancake off the griddle was on top. That’s way too much work. Additionally, if you were a coder at Spotify and were designing the “play next” function, implementing a stack instead of a queue would require that the application would have to go to the bottom of the list of songs to play next to get the song that the user requests to play next. That would be inefficient and impractical. This week we have been examining those data structures such as a stack and a queue and analyzing in what situation does one make sense over another.

Published by Jane

Hello! My name is Jane Abbott and I am currently a junior majoring in Computer Science and minoring in Religion. I am originally from outside of Philadelphia where I like to eat Wawa hoagies and pronounce water as “wuter.” Outside of my studies, I stay engaged with the CC campus community as the current Parliamentarian for the Colorado College Student Government Association. I also enjoy knitting (I knit a really cool blanket this summer) and watching the Eagles play during my free time.