Her Campus Logo Her Campus Logo

Organizing Your Closet Like a Computer Scientist

This article is written by a student writer from the Her Campus at UCD chapter.

The millennial mind loves to obsess over minuscule problems. So much so, that it often fails to recognize both easy and tangible solutions. Although I wish my brain was an exception, I’ve fallen victim to this cycle more times than I’d like to admit. However, my computer science courses are teaching me to spend less time circling my problems are more time thinking about possible solutions. Although my classes have not revealed the remedy to all of life’s tribulations, at the very least my closet has never been more organized.

The problem solving process in computer science can be broken into two components. First, the step-by-step solution to a problem is known as the algorithm. The second part involves implementation, or execution of the algorithm, which can often be carried out in multiple ways. Don’t worry if that sounded like gibberish, it’s taken me three quarters to understand and I would argue my comprehension is still minimal. 

Image source: Pexels

Whether we know it or not, we do this all day long. Take for example the 10 x 10 closet in the freshman dorms. We know the goal is to fit all our belongings in our designated space. The question is: how do we go about implementing this task? One possibility is to cram each clothing piece into the drawers; however, I would not argue this to be a favorable option unless you’re fond of a wrinkled aesthetic. We want a solution that will maximize space efficiency while minimizing clothing search time. A stack is another possible implementation. In computer science, stacks are also a common way to organize data. Most of my life I organized my dresser drawers using stacks. However, in order to access an item below the top, every piece above it needs to be removed. This is both tedious and creates the risk of unfolding the entire stack when trying to access items near the bottom.

Fear not, there is a third option. Instead of stacking the shirts on top of one another, the stack can be laid on its side to create something similar to what is known as a queue in computer science. When a drawer is opened, the entire line of clothing is visible for selection. This implementation reduces both stack search time and the risk of unfoldation (yes, I did just coin that word). 

Image source: Pexels

Although the way you choose to organize your clothes may seem trivial, this is just a tiny glance into the mind of a computer scientist and the process of efficient problem solving. 

Haley is a fourth-year student pursuing a major in Computer Science. When she is not at the library, she enjoys running, watching TED talks, and practicing her French. Most of her happiness in life comes from a cup of tea and a good book.
Gretchen is a fourth year UC Davis student double majoring in political science and cinema & digital media. As an intersectional feminist, she finds interest in issues of social justice and equality. She also finds interest in dogs, Leonardo DiCaprio movies, and early 2000s music.