All roadmaps
DSABasic

Python DSA — Beginner

Start from zero confidence and build it up. Every problem here uses one simple idea — a loop, a list, a dictionary, or a set. No tricks, just fundamentals that stick.

20 problems~5h
1
Sum of Array Elementsbasicdsa

Loop through a list and accumulate a total — the most basic pattern you will use in every program you ever write.

2
Count Even Numbers in Arraybasicdsa

Loop + if condition — filtering with modulo (%). Practice reading each element and deciding whether to count it.

3
Find Maximum in Arraybasicdsa

Track a running max in a loop — the pattern behind argmax, leaderboard rankings, and top-N logic.

4
Find Minimum in Arraybasicdsa

Same loop pattern as max — practice it in both directions before combining them.

5
Reverse an Arraybasicdsa

Build a reversed list with a loop or slicing [::-1] — your first look at index manipulation.

6
Running Sum of 1D Arraybasicdsa

Prefix sums — store cumulative totals as you go. This pattern powers analytics and range queries.

7
Count Occurrences of Valuebasicdsa

Linear search with a counter — lays the groundwork for frequency maps and GROUP BY logic.

8
Remove All Occurrences of Valuebasicdsa

Build a filtered list — [x for x in arr if x != val]. List comprehension is a must-know Python pattern.

9
Find Second Largest Elementbasicdsa

Track two variables in one pass — extends the max pattern and forces careful edge-case thinking.

10
Count Vowels in Stringbasicdsa

Loop over a string character by character — strings are just lists of characters in Python.

11
Reverse Words in a Sentencebasicdsa

split() + reverse + join() — three string methods chained together. The classic string manipulation pattern.

12
Count Character Frequencybasicdsa

Build a dict with a loop — your introduction to frequency maps (Counter). Used in anagram, substring, and histogram problems.

13
Most Frequent Characterbasicdsa

Frequency dict + max(dict, key=dict.get) — builds directly on count-char-frequency. Two ideas in one problem.

14
Check if Two Strings Are Anagramsbasicdsa

Compare two frequency dicts — your first use of a dict as a comparison tool, not just storage.

15
First Non-Repeating Characterbasicdsa

Two-pass loop: build frequency map, then find first count-1 char — a clean example of why two passes beats one.

16
Find Missing Number (1 to N)basicdsa

Sum formula trick: expected sum minus actual sum = missing value. Your first O(1) space algorithm.

17
Find the Duplicate in Arraybasicdsa

Use a set to detect the first repeated element — sets give O(1) lookup, making this O(n) overall.

18
Intersection of Two Arraysbasicdsa

Convert both to sets and use & — your first set operation. Directly models SQL INNER JOIN on IDs.

19
Is One String a Subsequence of Anotherbasicdsa

Two-pointer read-through — advance one pointer only on match. Clean intro to the two-pointer idea.

20
Convert String to Title Casebasicdsa

split() + capitalize() + join() — string pipeline thinking. Finish with a confidence boost problem.