Skip to main content

Box Coding Interview Questions

31 Box coding interview problems with full optimal solutions — 20 easy, 11 medium, 0 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Box interviewer values, and a FAQ section.

Showing 20 problems of 31

  • #28easyfoundational

    28. Lowest Common Ancestor of a Binary Search Tree

    Find the deepest node that is an ancestor of two given nodes in a BST — Box uses LCA logic when computing the nearest shared parent folder for two files to determine the effective permission scope for a sharing operation.

  • #1easyfoundational

    1. Two Sum

    Find two indices in an array whose values sum to a target — Box uses this to filter for hash-map fluency in storage indexing problems.

  • #2easyfoundational

    2. Valid Parentheses

    Validate balanced brackets using a stack — Box uses this pattern when parsing file path tokens and permission expression syntax.

  • #3easyfoundational

    3. Merge Two Sorted Lists

    Merge two sorted linked lists into one sorted list — Box uses this when merging two sorted streams of file change events during sync reconciliation.

  • #5easyfoundational

    5. Remove Element

    Remove all occurrences of a target value from an array in place — Box uses this when pruning revoked share links from in-memory permission caches.

  • #6easyfoundational

    6. Search Insert Position

    Find an index in a sorted array using binary search — Box uses this when inserting a new file version into a sorted version-history list.

  • #7easyfoundational

    7. Plus One

    Add one to a number represented as an array of digits — Box uses this pattern when incrementing distributed version counters for files.

  • #8easyfoundational

    8. Merge Sorted Array

    Merge nums2 into nums1 in place — Box uses this when reconciling two sorted change journals during a sync rebase.

  • #10easyfoundational

    10. Same Tree

    Determine whether two binary trees are structurally identical with the same values — Box uses this when comparing two folder-tree snapshots during a conflict-resolution merge.

  • #11easyfoundational

    11. Symmetric Tree

    Check whether a binary tree mirrors itself around the center — Box uses this pattern when validating mirrored backup-tree consistency between primary and DR regions.

  • #13easyfoundational

    13. Balanced Binary Tree

    Verify that a binary tree is height-balanced — Box uses this when verifying rebalanced folder-shard trees after a metadata-store split.

  • #15easyfoundational

    15. Pascal's Triangle

    Generate the first numRows of Pascal's triangle — Box uses this row-building pattern as a warm-up for index-array manipulation in metadata layouts.

  • #16easyfoundational

    16. Best Time to Buy and Sell Stock

    Maximize profit by choosing one buy day and one later sell day — Box uses this single-pass tracking pattern for cost/savings metrics on the storage dashboard.

  • #17easyfoundational

    17. Valid Palindrome

    Check whether a string reads the same forward and backward after stripping non-alphanumerics — Box uses this two-pointer pattern in their filename-canonicalization fast paths.

  • #18easyfoundational

    18. Single Number

    Find the only element appearing once in an array where every other appears twice — Box uses XOR-style tricks when matching unpaired sync events to detect orphans.

  • #19easyfoundational

    19. Linked List Cycle

    Detect a cycle in a singly linked list — Box uses this idea to spot cyclic symlink references in folder graphs before they crash the indexer.

Box Coding Interview Questions — Full Solutions — InterviewChamp.AI