bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch
Beginner track

First 20 puzzles

A guided path from reading small code fragments into arrays, strings, and hash maps.

0 of 20 done0%

Read code one line at a time

Variables, branches, loops, and return values before heavier data-structure choices.

0 / 5
1. Create a valueContains Duplicate - Recognize that a variable can hold a helper object.2. Read a return valueBest Time to Buy And Sell Stock - Follow a tiny function from setup to return.3. Complete a base caseClimbing Stairs - Notice the simple case before the loop starts.4. Trace a branchBinary Search - Track what changes after each comparison.5. Read a conditionValid Palindrome - Use the loop boundary and final return together.

Move through arrays

Index positions, running state, and simple scans.

0 / 5
6. Use an array valueTwo Sum - Connect the current number to a target.7. Keep a running bestBest Time to Buy And Sell Stock - Track one useful value while scanning prices.8. Find the wrong branch resultContains Duplicate - A condition can be correct while the returned value is wrong.9. Trace an index answerTwo Sum - Follow how a lookup turns into returned indexes.10. Pick a boundary testContainer With Most Water - Choose an input that proves pointer movement works.

Work with strings

Characters, cleanup, comparison, and encoded structure.

0 / 5
11. Count charactersValid Anagram - Treat a string as a sequence of characters.12. Catch an off-by-one string bugValid Palindrome - String indexes stop at length minus one.13. Test encoded stringsEncode and Decode Strings - Notice why empty strings and delimiters matter.14. Predict string logicValid Anagram - Read a small string example without memorizing the problem.15. Choose the grouping signalGroup Anagrams - Find the representation that makes equal strings comparable.

Store what you have seen

Sets and maps as memory for duplicates, counts, and lookups.

0 / 5
16. Trace a setContains Duplicate - A set remembers which values appeared earlier.17. Fix the lookup keyTwo Sum - Maps only work when you store values under the key you later search for.18. Build groupsGroup Anagrams - Use a map entry to collect matching strings.19. Count frequencyTop K Frequent Elements - A map can count how often each value appears.20. Fix a count comparisonValid Anagram - Zero means balanced; below zero means too many.