Skip to main content

Cisco Coding Interview Questions

30 Cisco coding interview problems with full optimal solutions — 6 easy, 22 medium, 2 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Cisco interviewer values, and a FAQ section.

  • #2mediumfrequently asked

    2. Add Two Numbers

    Add Two Numbers at Cisco is a linked-list problem that mirrors big-integer addition. The interviewer is checking whether you handle the carry propagation correctly and whether you use a dummy-head node to avoid edge-case branching on the first append.

    2 free resourcesSolve →
  • #20easyfoundational

    20. Valid Parentheses

    Valid Parentheses at Cisco is a 5-minute warm-up where the interviewer just wants to confirm you know what a stack is. Skip it in under 10 minutes and you've earned the harder graph round. The interviewer is grading whether you map closing brackets to openers correctly and whether you handle the empty-stack pop.

    2 free resourcesSolve →
  • #48mediumfrequently asked

    48. Rotate Image

    Rotate Image at Cisco tests whether you can manipulate a 2D matrix in place without falling back to an auxiliary matrix. The interviewer wants the transpose-then-reverse trick because it generalizes to any 90-degree rotation and uses zero extra space.

    3 free resourcesSolve →
  • #53mediumfrequently asked

    53. Maximum Subarray

    Maximum Subarray at Cisco is the canonical Kadane's-algorithm problem. The interviewer is checking whether you reach for the O(n) one-pass scan with the running-max invariant rather than the brute-force O(n^2) double loop.

    3 free resourcesSolve →
  • #54mediumfrequently asked

    54. Spiral Matrix

    Spiral Matrix at Cisco is a matrix-traversal problem that tests index arithmetic under pressure. The interviewer is checking whether you maintain the four boundaries (top/bottom/left/right) and shrink them after each side rather than juggling four separate loop variables.

    3 free resourcesSolve →
  • #56mediumfrequently asked

    56. Merge Intervals

    Merge Intervals at Cisco appears in any interview involving scheduling, packet timing windows, or maintenance ticket consolidation. The interviewer is checking whether you sort first and whether you mutate the last merged interval in-place rather than building fresh objects each step.

    3 free resourcesSolve →
  • #70easyfoundational

    70. Climbing Stairs

    Climbing Stairs at Cisco is a 5-minute DP warm-up that filters for candidates who recognize the Fibonacci recurrence. The interviewer wants the O(1)-space bottom-up loop and is grading whether you go straight there or get stuck in naive recursion.

    3 free resourcesSolve →
  • #78mediumfrequently asked

    78. Subsets

    Subsets at Cisco tests the canonical backtracking pattern: pick-or-skip on each element. The interviewer is checking whether you write the recursion as 'include nums[i], recurse; exclude, recurse', and whether you correctly snapshot the current path on the way down rather than at the leaves.

    3 free resourcesSolve →
  • #79mediumfrequently asked

    79. Word Search

    Word Search at Cisco is a DFS-on-grid problem with backtracking. The interviewer is checking whether you mark cells as visited BEFORE the recursion and unmark AFTER — the classic 'place + try + unplace' backtracking template.

    3 free resourcesSolve →
  • #102mediumfrequently asked

    102. Binary Tree Level Order Traversal

    Binary Tree Level Order Traversal at Cisco is the canonical BFS-on-tree problem. The interviewer is checking whether you snapshot the queue size at the start of each level loop — the trick that turns a flat BFS into a grouped-by-level output.

    2 free resourcesSolve →
  • #121easyfoundational

    121. Best Time to Buy and Sell Stock

    Best Time to Buy and Sell Stock at Cisco is a one-pass scan that masquerades as DP. The interviewer is checking whether you maintain a 'minimum-so-far' invariant and compute profit against it at every position, all in one walk.

    2 free resourcesSolve →
  • #127hardfrequently asked

    127. Word Ladder

    Word Ladder at Cisco is a graph-BFS problem where the graph isn't given to you — you have to construct the implicit edges by recognizing 'two words are adjacent iff they differ by exactly one letter.' The interviewer is checking whether you build the adjacency on-the-fly using a wildcard pattern trick to keep edges fast.

    3 free resourcesSolve →
  • #133mediumfrequently asked

    133. Clone Graph

    Clone Graph at Cisco is a graph-traversal + hash-map double check. The interviewer wants to see whether you reach for a 'visited → clone' map immediately and whether you can handle the cycle-creating self-reference without an infinite recursion.

    3 free resourcesSolve →
  • #141easyfoundational

    141. Linked List Cycle

    Linked List Cycle at Cisco is the second-most common pointer warm-up after Reverse Linked List. The interviewer wants Floyd's tortoise-and-hare so you can detect the loop in O(1) extra space. The hash-set version is the fallback when you can't articulate why two pointers eventually meet.

    3 free resourcesSolve →
  • #146mediumcompany favorite

    146. LRU Cache

    LRU Cache at Cisco is the OOP design problem the company most reliably asks because cache layers sit in every product they ship — from route lookup tables to ARP entries. The interviewer is checking whether you reach for the hash-map-plus-doubly-linked-list combo and whether you can wire the splice/unlink helpers without errors.

    3 free resourcesSolve →
  • #153mediumfrequently asked

    153. Find Minimum in Rotated Sorted Array

    Find Minimum in Rotated Sorted Array at Cisco is a modified-binary-search problem. The interviewer is checking whether you reach for log-n directly rather than scanning, and whether you correctly identify which half of the array contains the rotation pivot.

    2 free resourcesSolve →
  • #155mediumfrequently asked

    155. Min Stack

    Min Stack at Cisco is a classic OOP design problem that tests whether you can augment a standard data structure to support an extra O(1) query. The interviewer wants the auxiliary-stack approach and is grading whether you remember to pop the aux stack when the data stack pops the current min.

    2 free resourcesSolve →
  • #200mediumcompany favorite

    200. Number of Islands

    Number of Islands is Cisco's most recurring graph-DFS question because it maps almost one-to-one onto a real Cisco engineering task: partitioning a grid of nodes into connected network segments. The interviewer is checking whether you reach for DFS or BFS without hesitation and whether you mutate-in-place or use a visited set.

    3 free resourcesSolve →
  • #206easyfoundational

    206. Reverse Linked List

    Reverse Linked List at Cisco is a 10-minute warm-up to filter for candidates who can implement pointer manipulation without losing track of the next-pointer save. The interviewer wants the iterative three-pointer pattern, and they pivot to recursive as a follow-up.

    3 free resourcesSolve →
  • #207mediumcompany favorite

    207. Course Schedule

    Course Schedule is Cisco's go-to cycle-detection problem because dependency graphs sit at the heart of every router-config validator and build-system the company ships. The interviewer is checking whether you reach for Kahn's algorithm or DFS three-coloring, and whether you can explain why a cycle = a circular dependency.

    3 free resourcesSolve →
  • #208mediumfrequently asked

    208. Implement Trie (Prefix Tree)

    Implement Trie at Cisco is the OOP design question they ask when the team works on prefix-match systems — IP-prefix routing tables, autocomplete in their config CLIs, or rule lookup. The interviewer is checking whether you can build the class cleanly and whether you handle the prefix-vs-full-word distinction.

    4 free resourcesSolve →
  • #210mediumfrequently asked

    210. Course Schedule II

    Course Schedule II at Cisco is the natural follow-up to Course Schedule — instead of returning true/false for satisfiability, you return the actual topological order. The interviewer is checking whether you reach for Kahn's algorithm because the dequeue order IS the topological order.

    3 free resourcesSolve →
  • #215mediumfrequently asked

    215. Kth Largest Element in an Array

    Kth Largest at Cisco is a heap problem masquerading as a sort problem. The interviewer is checking whether you reach for a size-K min-heap (O(n log k)) instead of full-sort (O(n log n)), and whether you can articulate why the heap trick wins on streaming data.

    3 free resourcesSolve →
  • #261mediumfrequently asked

    261. Graph Valid Tree

    Graph Valid Tree at Cisco asks whether an undirected graph is a tree. The interviewer is checking whether you remember the TWO defining properties — exactly n-1 edges AND fully connected — and whether you reach for Union-Find or DFS to verify them.

    3 free resourcesSolve →
  • #323mediumfrequently asked

    323. Number of Connected Components in an Undirected Graph

    Number of Connected Components at Cisco is the union-find warm-up. The interviewer is checking whether you reach for Union-Find with path compression and union-by-rank, OR a simpler DFS over an adjacency list. Both are valid; union-find is the answer they want when the problem later extends to dynamic edge additions.

    3 free resourcesSolve →
  • #332hardless common

    332. Reconstruct Itinerary

    Reconstruct Itinerary at Cisco is the Eulerian path problem — you must use every edge exactly once and return the path in lex-smallest order. The interviewer is checking whether you reach for Hierholzer's algorithm and whether you build the adjacency lists as sorted heaps or sorted arrays consumed back-to-front.

    4 free resourcesSolve →
  • #438mediumfrequently asked

    438. Find All Anagrams in a String

    Find All Anagrams at Cisco is a fixed-window sliding-window problem with a frequency invariant. The interviewer is checking whether you maintain the window's char counts incrementally rather than re-counting from scratch at every position.

    3 free resourcesSolve →
  • #743mediumcompany favorite

    743. Network Delay Time

    Network Delay Time is the most on-brand Cisco interview question — it's literally framed as 'how long does a signal take to reach every node in a network?' The interviewer is checking whether you reach for Dijkstra's algorithm and whether you implement it with a binary heap rather than a linear scan.

    4 free resourcesSolve →
  • #787mediumfrequently asked

    787. Cheapest Flights Within K Stops

    Cheapest Flights at Cisco is the constrained-shortest-path problem they ask after Network Delay Time. Adding a hop-limit forces you to either modify Dijkstra to track stops or pivot to Bellman-Ford bounded to K+1 relaxations. The interviewer is checking whether you know Dijkstra-with-state-augmentation isn't always the right tool.

    3 free resourcesSolve →
  • #997easyfrequently asked

    997. Find the Town Judge

    Find the Town Judge at Cisco is a graph in-degree / out-degree problem disguised as a trust puzzle. The interviewer is checking whether you can recast 'judge = everyone trusts them, they trust no one' as 'in-degree N-1, out-degree 0' on a directed graph.

    2 free resourcesSolve →

Related interview-prep guides

Interview Process

Common IT Interview Questions for 2026: 31 Questions Across Hardware, OS, Networking, Security, and Ticket Workflow

Common IT interview questions in 2026 still test the same four loops: can you fix a broken machine, can you navigate Windows and Linux without Googling every step, do you understand how packets move through a network, and can you keep your composure with an angry user on a ticket SLA. This guide gives 31 questions across the five categories you'll be asked, the honest answers a Tier 1 to Tier 3 IT candidate should rehearse, and the 5-step prep plan for the help desk, IT specialist, sysadmin junior, and SOC analyst interview loop.

Cisco Coding Interview Questions — Full Solutions — InterviewChamp.AI