Algorithms 101 Recap

Jane Guan
Girl Develop It San Francisco
4 min readAug 9, 2016

An algorithm is “a repeatable process for determining the solution to a problem” — and it is at the very core of coding.

On Sunday, July 24th, at Girl Develop It San Francisco’s ​Algorithms 101 workshop, students learned how to design algorithms and express complex problem-solving in code.

“I thought it was going to be scary and we’d have to code a lot, but I was happily surprised that we were mostly working on whiteboards.” — Anna Natorilla

Amelia Downs​, Software Engineer at Pivotal & ​Jessica Dene Earley​, Lab Instructor at Hackbright, led this workshop.

Amelia and Jessica noted that it’s really the thought process in crafting an effective algorithm that matters. Rather than jumping into how to write algorithms and perfecting syntax, we explored the design of algorithms through hands-on, interactive, and collaborative exercises. Throughout the rest of the workshop, we learned what an algorithm was, got an introduction to algorithmic complexity, and demonstrated sort and search algorithms, all in fun and interactive ways.

An algorithm is “a repeatable process for determining the solution to a problem” — and it is at the very core of coding.

Algorithms in Daily Life

We were introduced to algorithms through a few everyday examples. For example, how do we decide what to watch on TV, or how do we decide how to do grocery shopping? This helped us visualize simple algorithms that would help us with making decisions on a day-to-day basis.

Data Structures

Next, we learned about Data Structures. In other words, we learned about the way data can be stored in a way that’s most effective for when needed. For example, data can be stored in arrays or lists, sets, and more. Each has their own properties and advantages depending on the data itself and the way you need to use it.

Complexity

An effective algorithm that works is one that is able to solve a problem again and again. However, creating a great algorithm is also all about optimization. A great algorithm should be both effective and efficient. Therefore, you want to optimize so the algorithm solves the problem in the shortest amount of time (time complexity) with the least amount of space (space complexity). The less complex, the better!

We ran through a few examples here of grocery shopping and doing laundry, coming up with solutions that either optimized for time, space, or both! We used big O notation to begin writing out basic algorithms that reflected those solutions. By using everyday examples and translating them to code, we were able to explore the way in which we create algorithms implicitly every day.

Searching & Sorting

Next, we learned important searching techniques like Binary Searching, as well as popular sorting techniques like Selection Sorting. We walked through some simulations of searching and sorting concepts. We also lined all the participants up and demonstrated Selection Sorting based on birthdays (resulting in everyone lined up in order by chronological birthdays)! We also evaluated which sorting techniques were best (in terms of time and space complexity) depending on the task.

Every time a new concept was introduced, participants were given data structures and a problem, and broke out into teams to solve it together. At the end of each exercise, each team presented their solution and walked through the process in which they arrived at that solution. Teams also got the chance to whiteboard their solutions and practice their whiteboarding, an important part of many technical interviews. Most importantly, participants were able to demonstrate their thorough understanding of a concept and receive feedback before moving onto the next concept.

Takeaways

By the end of the workshop, participants had developed an understanding of what algorithms were, the importance of time and space complexities in forming algorithms, and different search and sort techniques for handling data.

“Algorithms 101 with Girl Develop totally changed my mind about algorithms. It was the first time that I thought algorithms were actually fun and interesting. This class did a great job of supporting all learning styles, which I was not expecting. I hope to attend their next class!”

— Audrey So

Harry Potter finds its way into Algorithms 101

Interested in what we’re doing? Check out our workshops here and keep up with updates here. We’ve also got a Whiteboarding Interview Prep workshop coming up for those looking to refine their interviewing skills!

--

--