← All languages
Logic building programs
Conditionals, loops, recursion, arrays, strings — six phases of problems.
29 topics · 319 examples · ordered like a syllabus
Open the first problemTopics, in order
Finish one. The next is the card below.
- 01Phase 1 - Level 1: Simple ConditionsPractice basic conditional thinking with simple if-else statements and boolean logic.
- Check if Number is Positive, Negative, or Zero
- Check if a Number is Even or Odd
- Check if a Number is Divisible by 5
- 02Phase 1 - Level 2: Nested If & Multiple ConditionsMaster nested conditions and multiple condition combinations.
- Check if Three Sides Form a Valid Triangle
- Determine Triangle Type
- Grade Calculator
- 03Phase 1 - Level 3: Math and Number LogicSolve mathematical and number logic problems using conditionals.
- Check if All Digits are Distinct
- Check Middle Digit
- Check First and Last Digits Equal
- 04Phase 1 - Level 4: Logical Operators & Compound StatementsMaster logical operators and compound conditional statements.
- Check Letter, Digit, or Neither
- FizzBuzz Problem
- Find Median Value
- 05Phase 1 - Level 5: Creative / Tricky Logical ScenariosSolve creative and tricky logical problems using advanced conditional thinking.
- Point Location on Axes
- Check Pythagorean Triplet
- Check Valid Calendar Date
- 06Phase 2 - Level 1: Basic LoopingMaster basic loops - for and while loops for iteration.
- Print Numbers from 1 to 10
- Print All Even Numbers Between 1 and 100
- Sum of First N Natural Numbers
- 07Phase 2 - Level 2: Number-based Looping LogicApply loops to solve number manipulation problems.
- Count Digits in a Number
- Reverse a Number
- Check Palindrome Number
- 08Phase 2 - Level 3: Mathematical & Logical PatternsMaster mathematical series, sequences, and logical patterns using loops.
- Print Squares from 1 to N
- Print Cubes from 1 to N
- Numbers Divisible by 7
- 09Phase 2 - Level 4: Pattern PrintingMaster nested loops to print various patterns.
- Print Right Triangle Pattern
- Print Inverted Right Triangle
- Print Pyramid Pattern
- 10Phase 2 - Level 5: Logical Loop CombinationsCombine loops with complex logic - filtering, conditional accumulation.
- Numbers with Even Digit Sum
- Count Numbers Divisible by 7 but Not 5
- All Palindrome Numbers 1-500
- 11Phase 3 - Level 1: Basic RecursionIntroduction to recursion - functions that call themselves.
- Print 1 to N Recursively
- Factorial Using Recursion
- Print N to 1 Recursively
- 12Phase 3 - Level 2: Advanced RecursionMaster advanced recursive patterns - digit operations, GCD, binary conversion.
- Count Digits Recursively
- Reverse Number Recursively
- Check Palindrome Recursively
- 13Phase 3 - Level 3: Pattern RecursionPrint patterns using recursion.
- Print Line of N Stars Recursively
- Print Square of Stars Recursively
- Print Triangle (Top-Down) Recursively
- 14Phase 3 - Level 4: String-based RecursionApply recursion to string operations.
- Reverse String Recursively
- Check Palindrome String Recursively
- Count Vowels Recursively
- 15Phase 4 - Level 1: Basic ArraysIntroduction to arrays - storing and accessing multiple values.
- Input N Integers and Print Them
- Sum of Array
- Maximum Element
- 16Phase 4 - Level 2: Searching & Counting LogicMaster array searching, counting occurrences, and finding elements.
- Check if Element Exists
- Count Occurrences
- Find First Occurrence
- 17Phase 4 - Level 3: TransformationTransform arrays - reverse, rotate, swap, and create new arrays.
- New Array of Squares
- New Array with Only Even Elements
- Replace Negatives with 0
- 18Phase 4 - Level 4: Aggregation & ComparisonCompare arrays, merge arrays, find common elements.
- Compare Arrays (Same Order)
- Compare Arrays (Ignore Order)
- Merge Two Arrays
- 19Phase 4 - Level 5: Logical & AppliedApply array logic to solve complex problems.
- Check if Array is Sorted (Ascending)
- Check if Array is Sorted (Descending)
- Find Second Largest
- 20Phase 5 - Category 1: Basic String HandlingMaster fundamental string operations.
- Length of String
- Reverse String
- Convert to Uppercase
- 21Phase 5 - Category 2: Character OperationsMaster character-level string operations.
- Print First Character
- Print Last Character
- Print Each Character
- 22Phase 5 - Category 3: Word OperationsMaster word-level string operations.
- Print First Word
- Print Last Word
- Reverse Order of Words
- 23Phase 5 - Category 4: String TransformationTransform strings - replace, remove, insert operations.
- Replace Character
- Remove Character
- Insert Character at Position
- 24Phase 5 - Category 5: Advanced String LogicSolve complex string problems with advanced logic.
- Check Anagram
- Check if Substring Exists
- Count Substring Occurrences
- 25Phase 6 - Category 1: Number LogicApply all learned concepts to solve complex number logic problems.
- Complex Number Validation
- Number Meeting Multiple Conditions
- Perfect Numbers in Range
- 26Phase 6 - Category 2: Array & String CombinationsCombine array and string operations to solve complex problems.
- Convert Array to String
- Convert String to Array of Digits
- Count Vowels in Array of Strings
- 27Phase 6 - Category 3: Loop & Conditional MixCombine loops and conditionals for complex logic.
- Print Primes 1 to N
- Sum of Primes in Range
- Count Composite Numbers
- 28Phase 6 - Category 4: Mathematical CombinationsCombine mathematical concepts with programming logic.
- Sum of Squares
- Sum of Cubes
- Alternating Sum
- 29Phase 6 - Category 5: Real-World Logic ProblemsSolve real-world inspired logic problems.
- Password Strength Checker
- Advanced Grade Calculator
- BMI Calculator with Category
