ıWorkspace90 Days of Looping
Loops are the first step to data structures and algorithms. Every array scan, two-pointer sweep, binary search and sort is a loop with a plan. Do one a day for ninety days, from counting to sorting.
Easy and medium problems only, all original and never repeated elsewhere on this site. Same shape as the challenges (inputs, numbered tasks, a worked example), in JavaScript, TypeScript, Python, Java, C#, C++, C, PHP or Rust. The browser languages run on your device; the rest are checked by our server judge, so they need a connection. Days 1 to 10 are open. Each group of ten unlocks when you finish the one before it, and inside a group you can go in any order.
0 of 90 days done
Loops that count, add up and multiply. Every algorithm starts here: a counter, a total and a stopping point.
One pass over a list to add, count, find the biggest and the smallest. Scanning an array once and keeping a running answer is the backbone of linear-time solutions.
Text is just a list of characters, so everything you know about lists applies. String problems in interviews are array problems with letters.
Put an if inside the loop to keep, skip or change items. Filtering, mapping and comparing neighbours show up in nearly every array question.
While loops and early exits, for when you don't know how many rounds you need. Binary search, the Euclidean algorithm and graph search are all while loops with a clear stopping rule.
Nested loops compare every pair and build rows. The slow, simple answer to most problems is two loops. Knowing it is what lets you see how to beat it.
Two-dimensional data is a loop over rows with a loop over columns inside. Grids lead straight to flood fill, islands, dynamic programming tables and path problems.
Two pointers and sliding windows: loops that move two positions instead of one. Two pointers and sliding windows turn many quadratic answers into linear ones.
Prefix sums, counting, binary search, best stretch and sorting, all written as plain loops. This is where loops turn into named algorithms. You have already written the loops.