Problem bank
All 20 sets
140 exam-style problems in 20 sets of 7. Open any problem directly — practice needs no account.
SET 01 · 0/7
I/O & Arithmetic Basics
SET 02 · 0/7
Conditionals & Strings Basics
SET 03 · 0/7
Arrays: Frequency, Min/Max, Search
SET 04 · 0/7
Bitwise Operations & Number Properties
SET 05 · 0/7
Sorting Fundamentals
SET 06 · 0/7
Basic Geometry
SET 07 · 0/7
Prefix Sums & Range Queries
SET 08 · 0/7
Greedy Algorithms — Introduction
SET 09 · 0/7
Binary Search — On Arrays and On the Answer
- Q1Binary Search BasicVERY EASY
- Q2First and Last OccurrenceEASY
- Q3Square Root (integer floor)MEDIUM
- Q4Minimize the Maximum (Painter's Partition style)MEDIUM-HARD
- Q5Kth Smallest Element in a Sorted Matrix (via binary search on value)HARD
- Q6Aggressive Cows (Maximize Minimum Distance)VERY HARD
- Q7Median of Two Sorted Arrays in O(log(min(N,M)))EXTREME
SET 10 · 0/7
Number Theory: GCD, LCM, Primes, Divisors
- Q1GCD of Two NumbersVERY EASY
- Q2LCM of Two NumbersEASY
- Q3Prime Check (fast)MEDIUM
- Q4Count Divisors of Every Number up to N (Sieve style)MEDIUM-HARD
- Q5GCD of an Increasing Subsequence of Length K (mini version)HARD
- Q6Chinese Remainder Theorem (2 congruences)VERY HARD
- Q7Count Numbers ≤ N Coprime to N in a Range, Fast (Möbius-based)EXTREME
SET 11 · 0/7
Strings — Intermediate
- Q1Is PalindromeVERY EASY
- Q2Character FrequencyEASY
- Q3Anagram CheckMEDIUM
- Q4Longest Substring Without Repeating CharactersMEDIUM-HARD
- Q5Count Distinct Substrings of a String of a Single Repeated CharacterHARD
- Q6Z-Function / Pattern OccurrencesVERY HARD
- Q7Longest Palindromic Substring in O(N) (Manacher's Algorithm)EXTREME
SET 12 · 0/7
Graphs — BFS/DFS Introduction
- Q1Count Connected ComponentsVERY EASY
- Q2Shortest Path in an Unweighted GraphEASY
- Q3Detect a Cycle in an Undirected GraphMEDIUM
- Q4Bipartite CheckMEDIUM-HARD
- Q5Reachability on a Jump Graph (SHA75-style)HARD
- Q6Number of Islands (Connected Components in a Grid)VERY HARD
- Q7Strongly Connected Components (Kosaraju's or Tarjan's)EXTREME
SET 13 · 0/7
Dynamic Programming — Introduction
SET 14 · 0/7
Combinatorics & Modular Math
- Q1Factorial Mod PVERY EASY
- Q2nCr Mod PEASY
- Q3Count Arrangements with RepetitionMEDIUM
- Q4Modular ExponentiationMEDIUM-HARD
- Q5Number of Ways to Tile a 2×N Board with 1×2 Dominoes, Modulo PHARD
- Q6Catalan Number Application — Valid ParenthesizationsVERY HARD
- Q7Derangements Count (no fixed points), mod PEXTREME
SET 15 · 0/7
Advanced Greedy + Prefix Sums
- Q1Maximize Sum of Pairs (fixed pairs)VERY EASY
- Q2Maximum Sum of Chosen Subset's Adjacent DifferencesEASY
- Q3World T20 X Team (full version)MEDIUM
- Q4Minimum Cost to Connect Sticks (via extremes, priority-queue idea)MEDIUM-HARD
- Q5Balanced Partition (Minimize Difference)HARD
- Q6Task Scheduling with Cooldown (greedy + counting)VERY HARD
- Q7World T20 X Team, Offline with Point Updates (hardest variant)EXTREME
SET 16 · 0/7
Advanced Graphs — Implicit Graphs & Multi-source
- Q1Multi-Source BFS (Nearest Fire)VERY EASY
- Q2Knight's Minimum MovesEASY
- Q3SHA75-style Full Reachability with PrecomputationMEDIUM
- Q40-1 BFS (Grid with Some Free Moves)MEDIUM-HARD
- Q5Shortest Cycle Through a Given Edge / Node (mini)HARD
- Q6Dijkstra with Path Reconstruction on Large Sparse GraphVERY HARD
- Q7Reachability Precomputation on Jump Graph With Weighted Cost (final boss graph problem)EXTREME
SET 17 · 0/7
Advanced Number Theory
SET 18 · 0/7
Advanced Dynamic Programming
- Q1Coin Change — Minimum CoinsVERY EASY
- Q2Longest Common SubsequenceEASY
- Q3Matrix Chain Multiplication (min scalar multiplications)MEDIUM
- Q4Longest Palindromic SubsequenceMEDIUM-HARD
- Q5Maximum GCD-LIS Combined (final boss, matches Problem J exactly)HARD
- Q6Longest Increasing Subsequence With At Most One DeletionVERY HARD
- Q7Maximum GCD-Sum Subsequence (weighted variant)EXTREME
SET 19 · 0/7
Mixed Practice Contest — Round A
- Q1Ticket Number (warm-up)VERY EASY
- Q2Minimum Deletions to Make Frequency UniqueEASY
- Q3Smallest Window Containing All Characters of PatternMEDIUM
- Q4Maximum Product SubarrayMEDIUM-HARD
- Q5K Closest Points to Origin, then Path FeasibilityHARD
- Q6Sliding Window Maximum, With Sum-of-Maximums TwistVERY HARD
- Q7Trapping Rain Water in 2D (advanced grid + priority queue)EXTREME
SET 20 · 0/7
Final Mock Contest — Round B
- Q1Array Product Without DivisionVERY EASY
- Q2Median in a StreamEASY
- Q3Maximum GCD Subsequence + Range Team Query, CombinedMEDIUM
- Q4Shortest Path with Exactly K EdgesMEDIUM-HARD
- Q5Segment Tree with Range Update + Range GCD QueryHARD
- Q6Final Boss: Team Selection Under GCD Constraint (H + J truly combined)VERY HARD
- Q7Full Contest Simulator: Everything CombinedEXTREME