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