AlgoViz
HomeLearn the Basics

Learn the Basics

Complexity, patterns, recursion and hashing — the foundation.

0/ 44 understood · 0%
Walkthroughs
36
Problems
44
Start here
44 shown
  1. Time & Space ComplexityBig-O · how cost grows with inputEasy
  2. Recursion — the BasicsBase case + a smaller subproblemEasy
  3. Hashing — the BasicsO(1) average lookups, counts & setsEasy
  4. Loops & Number PatternsNested loops build rows and columnsEasy
  5. Practice problems
  6. Cpp BasicsHeaders, main(), input and outputEasy
  7. If ElseIfBranching on a conditionEasy
  8. Switch CaseOne value, many branchesEasy
  9. What are arrays, strings?Contiguous memory, 0-based indexingEasy
  10. For loopsRepeat a known number of timesEasy
  11. While loopsRepeat until a condition breaksEasy
  12. Functions (Pass by Reference and Value)Copies versus aliasesEasy
  13. Theory with examplesHow to approach any problemEasy
  14. Easy and MediumMixed warm-up setEasy
  15. Pattern 1Solid n x n squareEasy
  16. Pattern 2Left-aligned right triangleEasy
  17. Pattern 3Number triangle 1..i per rowEasy
  18. Pattern 4Row i repeats the number iEasy
  19. Pattern 5Inverted star triangleEasy
  20. Pattern 6Inverted number triangleEasy
  21. Pattern 7Centred star pyramidEasy
  22. Pattern 8Inverted centred pyramidEasy
  23. Pattern 9Star diamondEasy
  24. Pattern 10Star hill that grows then shrinksEasy
  25. Pattern 11Alternating 1/0 triangleEasy
  26. Pattern 12Number crown with a gapEasy
  27. Pattern 13Continuously increasing numbersEasy
  28. Pattern 14Alphabet triangle A, AB, ABCEasy
  29. Pattern 15Shrinking alphabet triangleEasy
  30. Pattern 16Row i repeats the i-th letterEasy
  31. Pattern 17Alphabet hill A, ABA, ABCBAEasy
  32. Pattern 18Triangle of trailing lettersEasy
  33. Pattern 19Star butterflyEasy
  34. Pattern 20Star butterfly, opening outwardMedium
  35. Pattern 21Hollow square outlineMedium
  36. Pattern 22Concentric number squareMedium
  37. STLC++ containers and algorithmsEasy
  38. Java CollectionsJava's equivalent toolboxEasy
  39. Count all Digits of a NumberDivide by 10 until nothing is leftEasy
  40. Reverse a numberPop digits off the back, push onto a new numberEasy
  41. Palindrome NumberReverse it and compareEasy
  42. GCD of Two NumbersEuclid: replace the larger with the remainderEasy
  43. Check if the Number is ArmstrongSum of digits raised to the digit countEasy
  44. Print all DivisorsOnly walk up to the square rootEasy
  45. Check for Prime NumberTrial division up to the square rootEasy