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.
Showing 12 problems of 25
- #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.
- #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.
- #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.
- #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.
- #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.
- #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.
- #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.