YourAlly

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

  1. Decode a Packed Decimal Field Locked
  2. Find the First Deadlock in a Lock Trace Locked
  3. Minutes Below Zone Quorum Locked
  4. Order Operator Installs by Dependency Locked
  5. Simulate Batch Initiators With Dependencies Locked

Sign up free to practice all 6

Related pages

More IBM Senior rounds

IBM coding at other levels

Other companies at this level