Skip to main content

Brex Coding Interview Questions

25 Brex 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 Brex interviewer values, and a FAQ section.

Showing 25 problems of 25

  • #1easyfoundational

    1. Two Sum

    Given an array of integers and a target, return indices of two numbers that add to the target.

  • #8easyfoundational

    8. Plus One

    Increment an integer represented as a digit array by one and return the resulting digits.

  • #11easyfoundational

    11. Same Tree

    Determine whether two binary trees are structurally identical with the same values.

  • #12mediumfoundational

    12. Maximum Product Subarray

    Find the contiguous subarray with the largest product — tests dynamic programming with sign-flip tracking, relevant to multi-currency gain/loss computations at Brex.

  • #14mediumfoundational

    14. Number of Islands

    Count connected land regions in a 2D grid using BFS or DFS — a graph traversal staple that Brex uses to assess structured problem decomposition skills.

  • #15easyfoundational

    15. Reverse Linked List

    Reverse a singly linked list iteratively or recursively — a fundamental pointer-manipulation problem that Brex uses as a warm-up in onsite coding screens.

  • #16mediumfoundational

    16. Course Schedule

    Detect a cycle in a directed graph of course prerequisites — directly mirrors approval-chain and spend-policy dependency validation at Brex.

  • #17mediumfoundational

    17. Implement Trie (Prefix Tree)

    Build a prefix tree supporting insert, search, and startsWith — tests data structure design skills relevant to Brex's merchant category autocomplete and rules-engine keyword matching.

  • #18mediumfoundational

    18. Coin Change

    Find the fewest coins to make a target amount — a classic unbounded knapsack DP that Brex maps to spend-limit decomposition and multi-currency rounding problems.

  • #19mediumfoundational

    19. Longest Increasing Subsequence

    Find the length of the longest strictly increasing subsequence — a DP / patience-sort problem that Brex interviewers use to test algorithmic depth and optimization awareness.

  • #20hardfoundational

    20. Trapping Rain Water

    Calculate how much water can be trapped between elevation bars — a two-pointer / stack classic that Brex uses to evaluate array reasoning under tight complexity constraints.

  • #21mediumfoundational

    21. Word Break

    Determine whether a string can be segmented into dictionary words — a DP string problem Brex applies to category-keyword parsing in its rules engine.

  • #22hardfoundational

    22. Median of Two Sorted Arrays

    Find the median of two sorted arrays in O(log(m+n)) — a binary search on partition problem that Brex uses to assess candidates' ability to handle ordered financial data sets efficiently.

  • #23easyfoundational

    23. Contains Duplicate

    Detect whether any value appears at least twice in an array — a hash set warm-up that Brex uses to establish baseline data structure fluency.

  • #24mediumfoundational

    24. Product of Array Except Self

    Return an output array where each element is the product of all other elements — a prefix/suffix product trick Brex tests in financial aggregation and ledger balance contexts.

  • #25hardfoundational

    25. Serialize and Deserialize Binary Tree

    Encode a binary tree to a string and decode it back — a design + traversal problem Brex uses to probe candidates' thinking about data persistence and approval-hierarchy snapshots.

Brex Coding Interview Questions — Full Solutions — InterviewChamp.AI