Nubank Coding Interview Questions
25 Nubank coding interview problems with full optimal solutions — 13 easy, 9 medium, 3 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Nubank interviewer values, and a FAQ section.
Showing 13 problems of 25
- #1easyfoundational
1. Two Sum
Given a transaction amounts array, find two debits that sum to a target reconciliation value.
- #2easyfoundational
2. Valid Parentheses
Validate that nested bracket structures in a KYC document parser are balanced.
- #3easyfoundational
3. Merge Two Sorted Lists
Merge two sorted ledger entry streams into a single chronological feed.
- #4easyfoundational
4. Remove Duplicates from Sorted Array
Deduplicate a sorted list of transaction IDs in-place to prepare a reconciliation batch.
- #5easyfoundational
5. Remove Element
Filter out cancelled-transaction codes in place to simplify a reconciliation feed.
- #6easyfoundational
6. Search Insert Position
Find the correct insertion index for a new credit-score tier into a sorted threshold table.
- #7easyfoundational
7. Maximum Subarray
Find the largest profitable contiguous period from a daily P&L series on a credit portfolio.
- #8easyfoundational
8. Plus One
Increment a digit-array representation of an account number while handling carry across all positions.
- #9easyfoundational
9. Same Tree
Determine whether two binary trees are structurally identical with equal node values, a classic recursion warm-up Nubank uses to check candidates can write clean base cases before any LatAm payments-domain follow-up.
- #10easyfoundational
10. Best Time to Buy and Sell Stock
Find the max profit from a single buy/sell over a price series — a one-pass sliding minimum that Nubank uses as an analog for FX/credit risk windowing.
- #11easyfoundational
11. Single Number
Find the element that appears once when every other element appears twice; Nubank uses it to probe bit-tricks intuition before deeper credit-ledger reconciliation problems.
- #12easyfoundational
12. Majority Element
Find the element that appears more than n/2 times in an array — Nubank uses Boyer-Moore voting as a proxy for streaming-fraud aggregation patterns.
- #13easyfoundational
13. Reverse Linked List
Reverse a singly linked list in-place; Nubank treats this as a pointer-discipline screen before harder ledger-traversal questions.