Lamp and Control Points
Reported by candidates from ZipRecruiter's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
ZipRecruiter's September OA included a geometry problem about lamps and control points. You're given a set of points and need to figure out coverage, placement, or visibility rules. The catch is that geometry problems on timed assessments rarely need heavy math. Most solve with coordinate comparisons, distance calculations, or a greedy sweep. If you blank on the exact geometry formula, StealthCoder reads the problem on screen and surfaces the core pattern so you don't lose time to panic.
Pattern and pitfall
Lamp and control point problems typically boil down to either: which points are within a lamp's range, how many lamps cover all points, or where to place a lamp optimally. The trick is recognizing whether you're doing a coverage check (distance formula, maybe binary search on lamp radius), a placement optimization (sort and greedy assignment), or a visibility query (line-of-sight, blocked by obstacles). Most candidates overthink the geometry. Write a distance function, sort by position or distance, and iterate. StealthCoder is your safety net if the problem statement is ambiguous on first read. It'll clarify whether this is a math problem disguised as geometry or a greedy/simulation wrapped in coordinate space.
Memorize the pattern. If you can't, run StealthCoder. The proctor sees the IDE. They don't see what's behind it.
You can drill Lamp and Control Points 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. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass ZipRecruiter's OA.
ZipRecruiter reuses patterns across OAs. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Lamp and Control Points FAQ
Is this a hard geometry problem or just coordinate math?+
Coordinate math. You likely just need distance formula (sqrt of (x2-x1)^2 + (y2-y1)^2) and a loop. Geometry hard problems ask for angles, intersections, or convex hulls. This one probably doesn't.
What if I forget the exact distance formula mid-OA?+
Write it out. Or remember: squared distance is fine for comparisons (avoids the sqrt). If you blank completely, StealthCoder reads the problem statement and shows you the pattern, so you can re-derive it under pressure.
Should I optimize for time or correctness first?+
Correctness. Get a brute-force loop passing. If all points are in range or coverage works, submit. Optimization (binary search, spatial indexing) only if you have time and the test is still failing on scale.
How do I tell if this is coverage, placement, or visibility?+
Read the question carefully. If it says 'how many lamps needed' it's placement or greedy. If it says 'which points are lit' it's coverage check. Reread once before coding.
Is this still being asked in September 2024?+
Yes. Geometry light and shadow problems are common in hiring now. They're less about calculus and more about simulation and greedy logic. You've seen harder problems.