AlgoViz

Library

All 638 problems

Filter by topic, difficulty, or what you have left to do.

638 problems

  1. Time & Space ComplexityLearn the Basics · Big-O · how cost grows with inputEasy
  2. Recursion — the BasicsLearn the Basics · Base case + a smaller subproblemEasy
  3. Hashing — the BasicsLearn the Basics · O(1) average lookups, counts & setsEasy
  4. Loops & Number PatternsLearn the Basics · Nested loops build rows and columnsEasy
  5. Cpp BasicsLearn the Basics · Headers, main(), input and outputEasy
  6. If ElseIfLearn the Basics · Branching on a conditionEasy
  7. Switch CaseLearn the Basics · One value, many branchesEasy
  8. What are arrays, strings?Learn the Basics · Contiguous memory, 0-based indexingEasy
  9. For loopsLearn the Basics · Repeat a known number of timesEasy
  10. While loopsLearn the Basics · Repeat until a condition breaksEasy
  11. Functions (Pass by Reference and Value)Learn the Basics · Copies versus aliasesEasy
  12. Theory with examplesLearn the Basics · How to approach any problemEasy
  13. Easy and MediumLearn the Basics · Mixed warm-up setEasy
  14. Pattern 1Learn the Basics · Solid n x n squareEasy
  15. Pattern 2Learn the Basics · Left-aligned right triangleEasy
  16. Pattern 3Learn the Basics · Number triangle 1..i per rowEasy
  17. Pattern 4Learn the Basics · Row i repeats the number iEasy
  18. Pattern 5Learn the Basics · Inverted star triangleEasy
  19. Pattern 6Learn the Basics · Inverted number triangleEasy
  20. Pattern 7Learn the Basics · Centred star pyramidEasy
  21. Pattern 8Learn the Basics · Inverted centred pyramidEasy
  22. Pattern 9Learn the Basics · Star diamondEasy
  23. Pattern 10Learn the Basics · Star hill that grows then shrinksEasy
  24. Pattern 11Learn the Basics · Alternating 1/0 triangleEasy
  25. Pattern 12Learn the Basics · Number crown with a gapEasy
  26. Pattern 13Learn the Basics · Continuously increasing numbersEasy
  27. Pattern 14Learn the Basics · Alphabet triangle A, AB, ABCEasy
  28. Pattern 15Learn the Basics · Shrinking alphabet triangleEasy
  29. Pattern 16Learn the Basics · Row i repeats the i-th letterEasy
  30. Pattern 17Learn the Basics · Alphabet hill A, ABA, ABCBAEasy
  31. Pattern 18Learn the Basics · Triangle of trailing lettersEasy
  32. Pattern 19Learn the Basics · Star butterflyEasy
  33. Pattern 20Learn the Basics · Star butterfly, opening outwardMedium
  34. Pattern 21Learn the Basics · Hollow square outlineMedium
  35. Pattern 22Learn the Basics · Concentric number squareMedium
  36. STLLearn the Basics · C++ containers and algorithmsEasy
  37. Java CollectionsLearn the Basics · Java's equivalent toolboxEasy
  38. Count all Digits of a NumberLearn the Basics · Divide by 10 until nothing is leftEasy
  39. Reverse a numberLearn the Basics · Pop digits off the back, push onto a new numberEasy
  40. Palindrome NumberLearn the Basics · Reverse it and compareEasy
  41. GCD of Two NumbersLearn the Basics · Euclid: replace the larger with the remainderEasy
  42. Check if the Number is ArmstrongLearn the Basics · Sum of digits raised to the digit countEasy
  43. Print all DivisorsLearn the Basics · Only walk up to the square rootEasy
  44. Check for Prime NumberLearn the Basics · Trial division up to the square rootEasy
  45. OverviewSorting Techniques · Why sorting matters · stability · in-placeEasy
  46. Bubble SortSorting Techniques · Swap adjacent out-of-order pairsEasy
  47. Selection SortSorting Techniques · Pick the smallest, place it in frontEasy
  48. Insertion SortSorting Techniques · Insert each key into a sorted prefixEasy
  49. Merge SortSorting Techniques · Divide, sort halves, mergeMedium
  50. Quick SortSorting Techniques · Partition around a pivotMedium
  51. Insertion SortingSorting Techniques · Grow a sorted prefix, one card at a timeEasy
  52. Merge SortingSorting Techniques · Split in half, sort each, zip togetherMedium
  53. Recursive Bubble SortSorting Techniques · One pass floats the max, then recurseEasy
  54. Recursive Insertion SortSorting Techniques · Sort the first n-1, then insert the lastEasy
  55. Quick SortingSorting Techniques · Partition around a pivot, recurse on both sidesEasy
  56. Contains DuplicateArrays & Hashing · A set remembers everything you've seenEasy
  57. Two SumArrays & Hashing · Unsorted input · remember complements in a mapEasy
  58. Valid AnagramArrays & Hashing · Same letters, same countsEasy
  59. Group AnagramsArrays & Hashing · Bucket words by their sorted signatureMedium
  60. Top K Frequent ElementsArrays & Hashing · Bucket by frequency, read from the topMedium