InterviewKata
Interview preparation

Cisco interview problems, by pattern

All 88 problems from Cisco's all-time LeetCode list (22 Easy, 50 Medium, 16 Hard), grouped by the pattern that solves them. 75 are solved on this site: open one to see which pattern to choose and why, the approach, the code with a line-by-line explanation, and a player that steps through the code on LeetCode's own example. Easy warm-ups and SQL/JavaScript problems link to LeetCode.

On the pattern pages these problems carry a Cisco badge. Frequency is LeetCode's relative score for this list (100 = asked most often). Read a pattern page first, then work through its group here from the most to the least frequent problem.

A 6-month plan

About 5–6 problems on 5 days a week. Each month: read the pattern page, solve its worked examples without looking, then this list. Re-solve anything you needed a hint for one week later.

WhenFocusPatterns (problems on the list)Total
Month 1Foundations: arrays you can scan01 · Prefix Sum (2)
02 · Two Pointers (8)
03 · Sliding Window (6)
04 · Fast & Slow Pointers (3)
05 · LinkedList In-place Reversal (4)
21 · Array & String Basics (6)
29
Month 2Stacks, heaps, intervals, binary search06 · Monotonic Stack (1)
07 · Top 'K' Elements (1)
08 · Overlapping Intervals (3)
09 · Modified Binary Search (5)
17 · Stack (3)
13
Month 3Trees and graphs10 · Binary Tree Traversal (3)
11 · Depth-First Search (DFS) on Graphs (2)
12 · Breadth-First Search (BFS) (3)
13 · Matrix Traversal (5)
23 · Union-Find (Disjoint Set Union) (1)
14
Month 4Search and dynamic programming14 · Backtracking (4)
15 · Dynamic Programming Patterns (8)
12
Month 5Hashing, greedy, design, weighted graphs16 · Hash Map & Set (5)
18 · Greedy (2)
19 · Trie & Design (4)
20 · Shortest Path & MST (1)
12
Month 6Math, range structures, then mock interviews22 · Math & Bit Manipulation (7)7

In the last two weeks, filter to Hard, sort your attention by frequency, and do timed mock interviews: 45 minutes, talk through the brute force, name the pattern, then code it.

All problems

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 SQL/JS

01 · Prefix Sum 2

2 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
560Subarray Sum Equals KMedium36Array, Hash Table, Prefix Sum
525Contiguous ArrayMedium36Array, Hash Table, Prefix Sum

02 · Two Pointers 8

7 solved on the pattern page (step-by-step explanation and a step-through player), 1 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
5Longest Palindromic SubstringMedium100Two Pointers, String, Dynamic Programming, Manacher
26Remove Duplicates from Sorted ArrayEasy50Array, Two Pointers
153SumMedium44Array, Two Pointers, Sorting
88Merge Sorted ArrayEasy44Array, Two Pointers, Sorting
283Move ZeroesEasy44Array, Two Pointers
125Valid PalindromeEasy44Two Pointers, String
75Sort ColorsMedium36Array, Two Pointers, Sorting, Quicksort, Bubble Sort
809Expressive WordsMedium36Array, Two Pointers, String

03 · Sliding Window 6

6 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
3Longest Substring Without Repeating CharactersMedium69Hash Table, String, Sliding Window
2067Number of Equal Count Substrings PremiumMedium64Hash Table, String, Sliding Window, Counting
121Best Time to Buy and Sell StockEasy44Array, Dynamic Programming
239Sliding Window MaximumHard44Array, Queue, Sliding Window, Heap (Priority Queue), Monotonic Queue, Range Minimum/Maximum Query
567Permutation in StringMedium36Hash Table, Two Pointers, String, Sliding Window
76Minimum Window SubstringHard36Hash Table, String, Sliding Window

04 · Fast & Slow Pointers 3

3 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
141Linked List CycleEasy55Hash Table, Linked List, Two Pointers, Floyd's Cycle Finding Algorithm
202Happy NumberEasy55Hash Table, Math, Two Pointers, Floyd's Cycle Finding Algorithm
287Find the Duplicate NumberMedium36Array, Two Pointers, Binary Search, Bit Manipulation, Pigeonhole Principle, Floyd's Cycle Finding Algorithm

05 · LinkedList In-place Reversal 4

3 solved on the pattern page (step-by-step explanation and a step-through player), 1 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
2Add Two NumbersMedium50Linked List, Math, Recursion
206Reverse Linked ListEasy44Linked List, Recursion
25Reverse Nodes in k-GroupHard44Linked List, Recursion
1290Convert Binary Number in a Linked List to IntegerEasy36Linked List, Math

06 · Monotonic Stack 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
84Largest Rectangle in HistogramHard36Array, Stack, Monotonic Stack, Range Minimum/Maximum Query

07 · Top 'K' Elements 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
1606Find Servers That Handled Most Number of RequestsHard36Array, Heap (Priority Queue), Simulation, Ordered Set

08 · Overlapping Intervals 3

3 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
56Merge IntervalsMedium44Array, Sorting, Quicksort
253Meeting Rooms II PremiumMedium44Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue), Prefix Sum
646Maximum Length of Pair ChainMedium36Array, Dynamic Programming, Greedy, Sorting, Longest Increasing Subsequence

09 · Modified Binary Search 5

5 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
2448Minimum Cost to Make Array EqualHard67Array, Binary Search, Greedy, Sorting, Prefix Sum
81Search in Rotated Sorted Array IIMedium36Array, Binary Search
33Search in Rotated Sorted ArrayMedium36Array, Binary Search
981Time Based Key-Value StoreMedium36Hash Table, String, Binary Search, Design
540Single Element in a Sorted ArrayMedium36Array, Binary Search

10 · Binary Tree Traversal 3

3 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
1443Minimum Time to Collect All Apples in a TreeMedium58Hash Table, Tree, Depth-First Search, Breadth-First Search, DP on Trees
236Lowest Common Ancestor of a Binary TreeMedium44Tree, Depth-First Search, Binary Tree, Binary Lifting, Lowest Common Ancestor
230Kth Smallest Element in a BSTMedium36Tree, Depth-First Search, Binary Search Tree, Binary Tree

11 · Depth-First Search (DFS) on Graphs 2

2 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
2603Collect Coins in a TreeHard99Array, Tree, Graph Theory, Topological Sort
207Course ScheduleMedium36Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Directed Acyclic Graph

12 · Breadth-First Search (BFS) 3

3 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
909Snakes and LaddersMedium36Array, Breadth-First Search, Matrix
1293Shortest Path in a Grid with Obstacles EliminationHard36Array, Breadth-First Search, Matrix
127Word LadderHard36Hash Table, String, Breadth-First Search, Bidirectional Search

13 · Matrix Traversal 5

4 solved on the pattern page (step-by-step explanation and a step-through player), 1 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
48Rotate ImageMedium84Array, Math, Matrix
1380Lucky Numbers in a MatrixEasy84Array, Matrix
54Spiral MatrixMedium80Array, Matrix, Simulation
498Diagonal TraverseMedium62Array, Matrix, Simulation
200Number of IslandsMedium50Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix

14 · Backtracking 4

4 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
212Word Search IIHard84Array, String, Backtracking, Trie, Matrix
17Letter Combinations of a Phone NumberMedium44Hash Table, String, Backtracking
79Word SearchMedium44Array, String, Backtracking, Depth-First Search, Matrix
46PermutationsMedium36Array, Backtracking

15 · Dynamic Programming Patterns 8

8 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
198House RobberMedium100Array, Dynamic Programming
53Maximum SubarrayMedium69Array, Divide and Conquer, Dynamic Programming
72Edit DistanceMedium62String, Dynamic Programming
486Predict the WinnerMedium44Array, Math, Dynamic Programming, Recursion, Minimax, Game Theory, Zero-Sum Game
647Palindromic SubstringsMedium36Two Pointers, String, Dynamic Programming
2719Count of IntegersHard36Math, String, Dynamic Programming
1143Longest Common SubsequenceMedium36String, Dynamic Programming, Longest Common Subsequence
312Burst BalloonsHard36Array, Dynamic Programming

16 · Hash Map & Set 5

5 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
1Two SumEasy55Array, Hash Table
149Max Points on a LineHard55Array, Hash Table, Math, Geometry, Euclidean Algorithm, Greatest Common Divisor
49Group AnagramsMedium44Array, Hash Table, String, Sorting
128Longest Consecutive SequenceMedium44Array, Hash Table, Union-Find
242Valid AnagramEasy36Hash Table, String, Sorting

17 · Stack 3

2 solved on the pattern page (step-by-step explanation and a step-through player), 1 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
20Valid ParenthesesEasy62String, Stack, Bracket Sequences
394Decode StringMedium50String, Stack, Recursion
1047Remove All Adjacent Duplicates In StringEasy36String, Stack

18 · Greedy 2

1 solved on the pattern page (step-by-step explanation and a step-through player), 1 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
55Jump GameMedium44Array, Dynamic Programming, Greedy
605Can Place FlowersEasy36Array, Greedy

19 · Trie & Design 4

4 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
3508Implement RouterMedium71Array, Hash Table, Binary Search, Design, Queue, Ordered Set
146LRU CacheMedium67Hash Table, Linked List, Design, Doubly-Linked List
380Insert Delete GetRandom O(1)Medium44Array, Hash Table, Math, Design, Randomized
642Design Search Autocomplete System PremiumHard36String, Depth-First Search, Design, Trie, Sorting, Heap (Priority Queue), Data Stream

20 · Shortest Path & MST 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
787Cheapest Flights Within K StopsMedium36Dynamic Programming, Depth-First Search, Breadth-First Search, Graph Theory, Heap (Priority Queue), Shortest Path

21 · Array & String Basics 6

2 solved on the pattern page (step-by-step explanation and a step-through player), 4 Easy warm-ups that link to LeetCode.

22 · Math & Bit Manipulation 7

4 solved on the pattern page (step-by-step explanation and a step-through player), 3 Easy warm-ups that link to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
412Fizz BuzzEasy73Math, String, Simulation
2081Sum of k-Mirror NumbersHard67Math, Enumeration
3047Find the Largest Area of Square Inside Two RectanglesMedium64Array, Math, Geometry
3648Minimum Sensors to Cover GridMedium64Math
136Single NumberEasy36Array, Bit Manipulation
50Pow(x, n)Medium36Math, Recursion
9Palindrome NumberEasy36Math

23 · Union-Find (Disjoint Set Union) 1

1 solved on the pattern page (step-by-step explanation and a step-through player).

Done#ProblemLevelFrequencyTopicsLinks
3607Power Grid MaintenanceMedium71Array, Hash Table, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Heap (Priority Queue), Ordered Set

SQL & JavaScript (practice on LeetCode) 1

Database and JavaScript problems from the list. They aren't Python algorithm problems, so they link straight to LeetCode.

Done#ProblemLevelFrequencyTopicsLinks
2986Find Third Transaction PremiumMedium71Database