Welcome to our Data Structures and Algorithms course! You may or may not have seen this course on Canvas as well during your time in the program. This repo is set up to give you easy access to the material from this course upon graduation so you can continue working and prepare for technical interviews.
Fork and clone this repository to get started! All the lessons for this course are contained in separate folders in this repo. Use the Course Roadmap at the bottom of this page to navigate and track your progress.
This course is split up so that you can devote 30 to 60 minutes each day to a new algorithm problem. You are welcome to move through the material faster if you have time to do so. Like learning anything, consistency is key, so make sure you have a plan for approaching this material and stick to it!
We recommend approaching these problems in order by yourself since each problem increases in difficulty. For a problem that is meant to be solved on the same day, work on it for 30 minutes. If you can’t solve it in 30 minutes, work on something else, and then come back to it and give yourself up to 30 more minutes. For problems that are meant to be solved over the course of several days, set aside 30 to 60 minutes each day to work on them. If you reach the time limit and have not solved the problem, look at our solution or someone else's and take time to understand why it works.
For any type of problem, if you were able to pass most of the test cases but just can’t quite solve a couple of the edge cases, consider looking for a solution to compare yours to. If we provide a solution, you can compare it to ours, but you can also ask other students and search the Internet. Take the time to understand why the solutions work and consider working on your solution until it works given what you’ve learned.
You may struggle with some or many of these problems. Be patient with yourself and trust that with time and practice, you’ll improve. You’ll be amazed at how much you progress with each week or month!
If you look at other solutions, be aware that shorter doesn’t mean better. Aim for a solution that makes sense to you, which you can also explain to others. Three lines of easy-to-understand code is better than one line of confusing code.
If you use an online platform that provides information on how fast your code runs or how well it utilizes memory, take that information with a giant grain of salt. Many of those platforms do not tell you how they arrive at those results, and you may find that the results vary greatly even when running the same code. You might also find that someone with a similar solution to yours has wildly different performance results - an indication that the platform isn’t calculating results correctly.
Lastly, try not to compare yourself to others at this point. Everyone progresses at a different pace, and that’s OK. The key is to keep trying while taking care of yourself mentally and physically.
Use the checklist below to track your progress. In Markdown, you can check an item off the list like so:
- [x] done with this
- [ ] still working
VSCode Users: You can install the Markdown Checkboxes extension to enable checkboxes in Markdown previews
Start with the Welcome section, then work your way through the other sections in order. You should reach out to a classmate or other Flatiron alumni to work on the pairing exercises together and give feedback.
- Welcome to Technical Interview Preparation
- Algorithmic Problem Solving
- A Note on Testing
- Problem Solving Tips
- Day 1: Reverse a String
- Day 2: Find First Duplicate
- Day 3: Fibonacci Series
- Day 4: Selection Sort
- Day 5: Find Shortest String
- Introduction to Recursion
- Day 1: Recursive Counting
- Day 2: Recursive Search
- Day 3: Recursive Fibonacci Series
- Day 4: Recursive Find Shortest String
- Day 5: Recursive Selection Sort
- Bonus 1: Balancing Parentheses
- Bonus 2: Roman Numeral to Integer
- Bonus 3: Rotate Array Clockwise
- Bonus 4: Distinct Pair Sum
- Bonus 5: Consecutive Substrings
- Days 1 to 2: Implement a Linked List
- Day 3: Underneath Arrays
- Day 4: Underneath Hashes
- Bonus Algorithm: Recursive String Reverse
- Bonus: Modify Linked List to Track Tail and Size
- Bonus: Build a Doubly Linked List
- Days 1 to 2: Binary Tree Traversal: Level-Order / Breadth-First
- Day 3 to 4: Tree Traversal In Order
- Day 5: Find Value Binary Tree
- Bonus: Quicksort