Construct Quad Tree at Uber
Medium78.1% acceptance
This problem has 87.5% frequency at Uber.
Problem Description
Given a `n * n` matrix `grid` of `0's` and `1's` only. We want to represent `grid` with a Quad-Tree. Return _the root of the Quad-Tree representing_`grid`. A Quad-Tree is a tree data structure in which each internal node has exactly four children. Besides, each node has two attributes: * `val`:...
Read full problem and hintsTopics
Also asked at 4 companies
More Uber Questions
Bus RoutesHardNumber of IslandsMediumKth Smallest Element in a BSTMediumSquares of a Sorted ArrayEasyLongest Continuous Subarray With Absolute Diff Less Than or Equal to LimitMedium
View all Uber questions