IBM Senior coding interview questions
These are the 6 coding questions YourAlly has tagged for IBM at Senior. On the YourAlly ladder this is Senior, the same level as Google L5, Meta E5 and Amazon L6.
A coding round at a large tech company usually runs 45 to 60 minutes with one or two problems. You write code that runs, test it on your own examples and state its time and space cost. At this level the bar is a correct, tested solution you reach mostly on your own, with the trade-offs said out loud.
Practice a mock IBM Senior coding loopPractice IBM coding questions
Count Wildcard Topic Subscription MatchesFree to read
A messaging broker routes each published topic to subscriptions. Topics are levels separated by /. In a subscription, + matches exactly one level and # matches zero or more remaining levels and can only be the last level. Given subscriptions and published topics, return for each topic how many subscriptions match it. Duplicate subscriptions count separately.
Input: subscriptions = [orders/+/created,orders/#,orders/eu/created,#], topics = [orders/eu/created,orders,payments/us] Output: [4,2,1]
What a strong answer covers
- Trie of levels with counts at terminal nodes
- # matches zero or more remaining levels
- Both exact and + branches explored
- Duplicates counted via node counters
- Worst-case 2^L branching discussed
5 more coding questions
- Decode a Packed Decimal Field Locked
- Find the First Deadlock in a Lock Trace Locked
- Minutes Below Zone Quorum Locked
- Order Operator Installs by Dependency Locked
- Simulate Batch Initiators With Dependencies Locked
Related pages
More IBM Senior rounds
- System design 4 questions
- Behavioral 5 questions
IBM coding at other levels
- Staff 3 questions
- Senior staff 3 questions
Other companies at this level
- Adobe Senior 7 questions
- Airbnb Senior 4 questions
- Amazon L6 10 questions
- Anthropic Senior 6 questions
- Apple Senior 7 questions
- Cisco Senior 6 questions