UBS coding interview
questions, leaked.
5 problems reported across recent UBS interviews. Top patterns: array, string, dynamic programming. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.
UBS coding interviews center on array manipulation, hitting you with medium-difficulty problems that chain multiple patterns together. You're looking at 5 core problems across their OA pool, split 2 easy and 3 medium, no hard questions. That's deceptive. Search Suggestions System pairs tries with binary search. Count Pairs on a Weighted Tree Network stacks arrays, trees, and DFS. You need speed and pattern recognition, not theoretical depth. If you blank mid-assessment, StealthCoder runs invisibly during screen share and surfaces a working solution in seconds, so you stay on pace and unblock yourself.
Top problems at UBS
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Search Suggestions System | MEDIUM | 100.0 | 65% | Array · String · Binary Search |
| 02 | Count Pairs of Connectable Servers in a Weighted Tree Network | MEDIUM | 94.6 | 54% | Array · Tree · Depth-First Search |
| 03 | Beautiful Arrangement | MEDIUM | 61.7 | 65% | Array · Dynamic Programming · Backtracking |
| 04 | Best Time to Buy and Sell Stock | EASY | 61.7 | 55% | Array · Dynamic Programming |
| 05 | Valid Parentheses | EASY | 61.7 | 42% | String · Stack |
Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.
You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual UBS OA. The proctor cannot see it. Screen share cannot detect it. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too.
Get StealthCoder- array4 · 80%
- string2 · 40%
- dynamic programming2 · 40%
- binary search1 · 20%
- trie1 · 20%
- sorting1 · 20%
- heap priority queue1 · 20%
- backtracking1 · 20%
- bit manipulation1 · 20%
- bitmask1 · 20%
Arrays show up in 4 of 5 problems. That's your anchor. Strings appear twice, and dynamic programming threads through multiple problems including Best Time to Buy and Sell Stock, which tests whether you can optimize brute force. The real trap is multi-topic problems: Search Suggestions System forces you to choose between binary search, trie, or sorting at runtime. Medium difficulty means clean implementations matter more than trick optimizations. Binary search, trie, backtracking, and bit manipulation each appear once, so don't over-drill those singletons. Drill arrays and strings first, then stack DP problems on top. If you hit a hybrid during your live OA and freeze, StealthCoder is your invisible safety net.
Companies with similar patterns
If you prepped for UBS, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass UBS.
Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too. Works on HackerRank, CodeSignal, CoderPad, and Karat.
UBS interview FAQ
How much array practice do I actually need for UBS?+
Array shows up in 4 of 5 reported problems, and it's never the only topic. Master array indexing, two-pointer, and prefix/suffix patterns. Then practice arrays combined with DP, strings, and tree traversal. That hybrid work matters more than drilling solo array problems.
Should I study tries and binary search or skip them?+
Search Suggestions System explicitly combines both. Spend a focused 2-3 hours on tries and binary search together, not separately. One problem doesn't mean deep expertise, but you need to recognize when to apply each. Know trade-offs and move on.
Is dynamic programming mandatory for UBS?+
It appears in at least 2 problems and overlaps with arrays. Best Time to Buy and Sell Stock is a DP classic UBS asks. You don't need advanced DP, but basic memoization and state-transition thinking are non-negotiable. Expect bottom-up and top-down approaches.
What's the hardest topic I'll see?+
No hard problems reported, so difficulty comes from topic combinations, not algorithm complexity. Medium means clean code and correct logic under time pressure. Backtracking and bit manipulation show up once each, so don't panic if you haven't drilled those extensively.
How should I split my prep time across 5 problems?+
Spend 40 percent on arrays and strings together, 30 percent on DP and recursion patterns, 20 percent on binary search and tries, 10 percent on bit manipulation and backtracking. The overlap means one drill session kills multiple topics. Stop drilling and simulate a timed OA 2 days before.