Reported July 2024
Ubergeometry

Count L Shapes

Reported by candidates from Uber's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Uber OA. Under 2s to a working solution.
Founder's read

You've got an Uber OA in your inbox with a geometry problem. Count L Shapes landed in July 2024 and it's a spatial reasoning question that looks simpler than it is. The trap is treating it as pure brute force when the real solution hinges on recognizing how L shapes tile or overlap in a grid. If you blank during the live OA, StealthCoder will read the problem on screen and feed you the pattern in real time, invisible to the proctor.

Pattern and pitfall

This problem asks you to count distinct L-shaped regions or configurations in a grid. The common approach is simulation or matrix traversal, but the trick is understanding whether you're counting static shapes, rotations, or placements. Many candidates iterate through every possible L and check validity, which works but is slow. The efficient path uses either combinatorics (precompute how many L's fit given grid dimensions), dynamic programming (build up from smaller grids), or flood fill logic (identify connected components and classify them). Uber leans toward testing whether you spot the underlying pattern rather than raw iteration speed. When you're live and uncertain, StealthCoder gives you the confidence to implement the right approach without guessing.

The honest play: practice the pattern, and have StealthCoder ready for the one you didn't see coming.

If this hits your live OA

You can drill Count L Shapes cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Uber's OA.

Uber reuses patterns across OAs. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Count L Shapes FAQ

Is this a connectivity problem or a counting problem?+

It's counting. You're tallying how many L shapes exist in or on a grid, not finding connected regions. The key is understanding what counts as an L (size, rotation, placement) from the problem statement. That definition drives your entire solution.

Can I brute force every possible L and check if it's valid?+

Yes, but it times out on large grids. Brute force works for small inputs to verify correctness. For full points, you need to spot that many L's are redundant or follow a pattern. Look for math or DP to collapse the computation.

Does rotation matter? Do I count an L and its 3 rotations separately?+

Depends on the problem statement, which you'll see during the OA. If it matters, all 4 rotations are distinct. If not, count unique unrotated shapes. Read carefully. The examples will clarify this fast.

How do I prepare in 48 hours if I've never seen this?+

Understand grid traversal and how to iterate through all possible L placements. Write a brute force solution first to verify logic. Then identify redundancy. Practice one or two similar grid problems on LeetCode (matrix or geometry). Uber values correctness over speed.

Is this asked often at Uber?+

Geometry and grid problems appear in Uber OAs, though not every cycle. The exact problem varies, but the mental model holds: define the shape, enumerate placements, optimize if needed. This problem tests pattern recognition and spatial thinking, which Uber does screen for.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Uber.

OA at Uber?
Invisible during screen share
Get it