
Data Structures & Algorithms - Optimized Problem Collection
PROJECTS · COMPUTER SCIENCE
Computer Science, DSA
500h
Sept 2023 - Present
ABOUT
Project Overview
Structured curated collection of the ~100 most relevant Data Structures & Algorithms (DSA) coding problems and their solutions, organized by fields, sub-fields, classes of problems and difficulty levels. Includes explanations of all DSA concepts.
SKILLS
Fields of Expertise
Problem Solving & Algorithmic Thinking:
Data Structures & Algorithms:
Software Development (SDLC):
Coding (C++):
Complexity: ★★★☆☆
Tools: DSA, Python, C++
Project Type: Personal Project
01
INTRO
CHAPTER
___ INTRO
Motivation
Many people do more than 500 coding questions to prepare for coding interviews. It is NOT NECESSARY to do this. After reviewing many different sources (LeetCode, HackerRank, GeeksforGeeks, Elements of Programming Interviews...) I have put together a curated selection of the ~100 most relevant DSA problems and their solutions, organized by fields
, sub-fields
, classes
of problems and difficulty
levels.
This collection aims to simplify the learning curve to prepare for DSA coding interviews, by providing a structured and optimized selection of 5-10 problems for each DSA category that will help understand the "general type" of questions, focusing only on the 20% of problems that matter the most and reducing workload by 80%.
___ INTRO
Features
Author's Note:
There are plenty of "Best lists" for DSA that can be found online (see resources below). The purpose of this repository is not to be the "ultimate" collection of DSA problems. I decided to create this collection to better understand the field of DSA while I was preparing for coding interviews, and help others do the same for free. It includes problems that I've come across and I've found most relevant from my personal point of view. At the same time, it's organized following a structure I personally find intuitive and practical for the global understanding of Data Structures and Algorithms, but it doesn't intend to be a 100% unique representation of reality.
With that being said, and although this collection is designed based on my personal understanding of the subject, I'm more than happy to receive feedback, suggestions and improvements that can help the community in any way!
Curated Selection: I've handpicked the most relevant problems to ensure you focus your time and effort on mastering essential concepts.
Optimized Learning: The collection is designed with the 80/20 principle in mind: focusing on achieving 80% of the learning with just 20% of the effort, saving you valuable time and energy.
Structured Learning Path: The collection follows a progressive learning path, guiding you through increasingly challenging problems to build your skills step by step.
Versatile Content: Whether you're a beginner starting your DSA journey or an experienced programmer looking to sharpen your skills, I believe this collection can be helpful for you in some way.
02
CONTENT
CHAPTER
___ CONTENT I
Content Structure
DSA problems are classified into fields
, sub-fields
, classes
of problems and difficulty
levels.
1. Abstract Data Types
Numerical Types (& Math)
Sequences I - Bits & Bytes
Sequences II - Strings
Sequences III - Lists
Sets & Maps
3. Algorithms
Programming Strategy Algorithms
Search Algorithms
Sorting Algorithms
Graphs Algorithms
Optimization Algorithms
___ CONTENT II
Classes of Problems/Difficulty Levels
__ FOUNDATIONAL PROBLEMS
Foundational problems aim to provide a general introduction to the sub-field, and present the basic operations and functionalities in the form of short and to-the-point exercises. These type of problems are not usually asked in practical coding interviews, but can appear sometimes as part of "theoretical understanding" of a specific data-type or data-structure. In this repository, foundational problems are only available for Python at the moment, but other languages (JAVA, C++) may be added in the future.
__ EASY PROBLEMS
Easy problems include practical questions that involve using the properties/advantages of the sub-field of study. They're ideal to tackle right after the foundational problems to strengthen the understanding of the DSA sub-field. Easy problems are commonly asked as introductory questions in early/middle round coding interviews, and should take between 5-20 min to complete.
__ MEDIUM PROBLEMS
Medium problems are challenging problems that already require a decent level of skill using a specific DSA sub-field. They usually involve using a specific type of algorithm that works well for a particular set of problems. Medium problems are typically the ones that you can expect as "main question" in most coding interviews. They typically take between 15-40 min to solve for the first time.
__ HARD PROBLEMS
Hard problems are very challenging (and tricky) problems that require not only a good mastery of the specific DSA sub-field, but also good knowledge and skills with algorithms and most importantly: good coding intuition. Most of the hard problems require realizing a certain trick or alternative formulation that makes the question easier to solve. Hard problems are asked in coding interviews mainly oriented to heavy software-developer roles, or certain positions in finance that require strong problem-solving skills. Depending on the coding expertise, hard problems can take from 15 minutes to several hours to solve; although is common to give up before finding a solution. For time optimization purposes, it's recommended to look at the answer to hard problems if no meaningful progress towards the solution has been made after 30-40 minutes.
___ CONTENT III
2. Data Structures
Arrays
Linked Lists
Hash-Maps
Trees
Trees by Nº of Nodes:
Tree (any nº of nodes)
Binary Tree (2 nodes)
Trees by Type of Sorting:
Search Tree (horiz. sorted tree)
Heap (vert. sorted tree)
Graphs
Solutions
All the problems presented in the collection include solutions. The main programming languages of the solutions are Python, JAVA and C++:
Solutions for the foundational problems are available only in Python at the moment.
Solutions for all the problems (easy, medium and hard) are usually available in Python, JAVA and C++ (except a few cases where only Python is available).
Solutions for the problems are not all my own, but usually a combination of my personal implementation and the best solutions I've found for each problem. I've made an effort to reference the original source of the answer for those problems/solutions that are not my own, but feedback is appreciated if this is not the case for some problems.
SEE MORE PROJECTS
MATH, PHYSICS & ENGINEERING PROJECTS
COMPUTER SCIENCE PROJECTS
ML & AI PROJECTS
QUANT FINANCE PROJECTS