PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Uber

Build Quadtree and Find Grid Words

Last updated: Apr 22, 2026

Quick Overview

This question evaluates divide-and-conquer tree construction and recursive spatial data structures for the quadtree task, and grid-based search and backtracking for the word-finding task, along with expected time and space complexity analysis for both.

  • hard
  • Uber
  • Coding & Algorithms
  • Software Engineer

Build Quadtree and Find Grid Words

Company: Uber

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Onsite

This interview included two algorithm problems. 1. Quad-partition tree: Given an `n x n` binary matrix where `n` is a power of 2, recursively build a tree representation of the matrix. Each node represents a square region. If all cells in the region have the same value, create a leaf node storing that value. Otherwise, create an internal node with four children in this order: top-left, top-right, bottom-left, bottom-right. Return the root node. 2. Find dictionary words in a character board: Given an `m x n` grid of lowercase letters and a list of candidate words, return all words that can be formed by moving horizontally or vertically between adjacent cells. A cell may be used at most once when forming a single word. Return each matching word at most once, in any order. Discuss the expected time and space complexity for both problems.

Quick Answer: This question evaluates divide-and-conquer tree construction and recursive spatial data structures for the quadtree task, and grid-based search and backtracking for the word-finding task, along with expected time and space complexity analysis for both.

Related Interview Questions

  • Implement Minesweeper and Word Search - Uber (medium)
  • Implement Store Autocomplete - Uber (medium)
  • Implement Cache Eviction And Seat Assignment - Uber (medium)
  • Schedule Non-Overlapping Meetings Efficiently - Uber (hard)
  • Evaluate an Arithmetic Expression - Uber
Uber logo
Uber
Jan 26, 2026, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
1
0
Loading...

This interview included two algorithm problems.

  1. Quad-partition tree: Given an n x n binary matrix where n is a power of 2, recursively build a tree representation of the matrix. Each node represents a square region. If all cells in the region have the same value, create a leaf node storing that value. Otherwise, create an internal node with four children in this order: top-left, top-right, bottom-left, bottom-right. Return the root node.
  2. Find dictionary words in a character board: Given an m x n grid of lowercase letters and a list of candidate words, return all words that can be formed by moving horizontally or vertically between adjacent cells. A cell may be used at most once when forming a single word. Return each matching word at most once, in any order.

Discuss the expected time and space complexity for both problems.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Uber•More Software Engineer•Uber Software Engineer•Uber Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.