Broadcom Coding Interview Questions
25 Broadcom coding interview problems with full optimal solutions — 8 easy, 12 medium, 5 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Broadcom interviewer values, and a FAQ section.
- #1easyvery frequently asked
1. Two Sum
Find two indices whose values add to a target. Broadcom screens for this in early rounds to verify you default to a hash-map solution over a brute-force nested loop — a signal that you instinctively reason about time complexity for large-scale data pipelines.
- #3mediumvery frequently asked
3. Longest Substring Without Repeating Characters
Find the length of the longest substring with all unique characters using a sliding window. Broadcom asks this to verify sliding-window intuition — the same technique underlies congestion window management in TCP implementations embedded in Broadcom's network silicon.
- #4hardoccasionally asked
4. Median of Two Sorted Arrays
Find the median of two sorted arrays in O(log(m+n)) time. Broadcom asks this because binary search on implicit data structures is a core skill for their systems engineers — the same partition-finding logic appears in percentile computation for network latency telemetry and SLA threshold analysis.
- #15mediumfrequently asked
15. 3Sum
Find all unique triplets that sum to zero. Broadcom asks 3Sum to test whether you handle duplicate-elimination correctly inside a sorted search — a skill that carries over to deduplication logic in ARP table management and MAC learning tables in switching software.
- #20easyfrequently asked
20. Valid Parentheses
Determine whether a string of brackets is balanced. Broadcom asks this because stack-based parsing is the foundation of protocol-frame validation and command-line parsers inside embedded firmware — a real problem the team encounters when parsing network management commands.
- #21easyfrequently asked
21. Merge Two Sorted Lists
Merge two sorted linked lists into one sorted list. Broadcom asks this because the merge step of merge sort appears directly in multi-queue packet scheduling algorithms used in Broadcom's network switch ASICs — merging sorted priority queues is a real hardware concern.
- #23hardfrequently asked
23. Merge K Sorted Lists
Merge k sorted linked lists into one sorted list efficiently. Broadcom asks this because multi-queue merging is a real operation in packet schedulers and priority-queue-based traffic shaping in Broadcom's Tomahawk switching ASICs — merging k traffic classes in O(n log k) is a production requirement.
- #42hardfrequently asked
42. Trapping Rain Water
Calculate total water trapped between bars of an elevation map. Broadcom asks this because the two-pointer technique and the min-of-max-prefix pattern directly generalise to buffer-fill calculations in streaming pipelines — a common problem in Broadcom's data-plane throughput analysis.
- #49mediumfrequently asked
49. Group Anagrams
Group strings that are anagrams of each other. Broadcom asks this to test canonical-key design — the same normalisation thinking used when building flow-key hashing for network traffic classification in Broadcom's switching ASIC control plane.
- #53easyfrequently asked
53. Maximum Subarray
Find the contiguous subarray with the largest sum. Broadcom asks Kadane's algorithm to verify that candidates understand linear-scan optimisation — directly applicable to signal-burst detection in network traffic analysis and time-series monitoring of chip telemetry.
- #56mediumfrequently asked
56. Merge Intervals
Merge all overlapping intervals into the minimum set of non-overlapping intervals. Broadcom asks this because interval merging is core to TCAM rule compression in switching ASICs — overlapping ACL rules must be collapsed to minimise ternary content-addressable memory consumption.
- #70easyfrequently asked
70. Climbing Stairs
Count the number of ways to climb n stairs taking 1 or 2 steps at a time. Broadcom uses this as an entry point to dynamic programming — the same recurrence structure appears in firmware retry-path enumeration and error-correction code design.
- #72hardoccasionally asked
72. Edit Distance
Compute the minimum number of insertions, deletions, and substitutions to transform one string into another. Broadcom asks this classic DP problem because Levenshtein distance underlies error-correcting code similarity metrics and firmware diff-patching algorithms — both critical in Broadcom's over-the-air update systems for embedded device fleets.
- #121easyfrequently asked
121. Best Time to Buy and Sell Stock
Find the maximum profit from a single buy-sell window in a price series. Broadcom asks this to see whether you can recognise a sliding-minimum scan — the same algorithmic pattern used in latency-window analysis for network performance monitoring.
- #127hardoccasionally asked
127. Word Ladder
Find the shortest transformation sequence from one word to another, changing one letter at a time. Broadcom asks this because it is shortest-path BFS on an implicit graph — the same technique used to find minimum-hop routing paths and convergence analysis in network topology recalculation after a link failure.
- #139mediumfrequently asked
139. Word Break
Determine if a string can be segmented into valid dictionary words. Broadcom asks this to test DP on strings — the same segmentation logic underlies pattern-matching in network packet payload inspection and protocol-field tokenisation in deep-packet inspection engines.
- #141easyfrequently asked
141. Linked List Cycle
Detect whether a linked list contains a cycle. Broadcom tests this because cycle detection is a foundational technique in routing-loop detection — a real operational concern in Broadcom's switch and router ASIC software for protocols like STP and BGP path validation.
- #146mediumvery frequently asked
146. LRU Cache
Design a cache that evicts the least-recently-used entry when full. Broadcom asks this because LRU is the dominant eviction policy in ARP caches, MAC address tables, and route-cache entries inside Broadcom's switching and routing ASICs — getting O(1) get and put right is a real firmware concern.
- #200mediumvery frequently asked
200. Number of Islands
Count connected components of land in a 2D grid. Broadcom asks this because graph connectivity is foundational to network-topology discovery — the same BFS/DFS that counts islands maps directly to identifying isolated segments in a physical switch topology or VLAN reachability analysis.
- #206easyfrequently asked
206. Reverse Linked List
Reverse a singly-linked list in place. Broadcom uses this to assess whether candidates can manipulate pointer arithmetic cleanly — a skill that maps directly to working with descriptor rings and buffer chains in network interface card drivers.
- #207mediumfrequently asked
207. Course Schedule
Determine if you can finish all courses given prerequisite dependencies — a cycle detection problem on a directed graph. Broadcom asks this because dependency-cycle detection is foundational to firmware build-system validation and hardware-block initialization ordering in complex SoC boot sequences.
- #236mediumfrequently asked
236. Lowest Common Ancestor of a Binary Tree
Find the lowest common ancestor of two nodes in a binary tree. Broadcom asks this because LCA is the basis for tree-based network topology analysis — finding the common aggregation point of two hosts in a hierarchical data-center topology or spanning tree.
- #238mediumfrequently asked
238. Product of Array Except Self
Compute the product of all elements except the current one without using division. Broadcom asks this because the prefix/suffix scan pattern directly maps to computing cumulative metrics — like packet-count products across an interface chain — without revisiting processed data.
- #322mediumfrequently asked
322. Coin Change
Find the minimum number of coins to make a given amount. Broadcom asks this unbounded-knapsack DP problem because the same 'minimum number of fixed-size units to cover a target' logic appears in packet fragmentation, MTU optimisation, and memory-block allocation in embedded systems.
- #347mediumfrequently asked
347. Top K Frequent Elements
Find the k most frequent elements in an array in better than O(n log n) time. Broadcom asks this because frequency-based ranking is fundamental to hot-flow identification in network traffic analysis — a core operation in Broadcom's telemetry and switching software.