Reported September 2024
Blackrockmath

Calculate Distance

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

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

Blackrock tested this in September 2024, and it's a geometry problem disguised as a distance calculation. You're probably solving Euclidean distance, Manhattan distance, or some hybrid between two points or a point and a set. The trick is recognizing which metric matters before you code. StealthCoder will catch you if the formula slips your mind under pressure, but the real win is nailing the pattern in the first 30 seconds.

Pattern and pitfall

Distance problems almost always boil down to math and, sometimes, geometry. The candidate likely needs to compute a distance metric (L2 norm, L1 norm, or custom), possibly optimized for speed or applied across multiple points. Common pitfall: using the wrong distance formula or missing that you need to minimize/maximize across a set of candidates. The pattern is usually straightforward arithmetic, but the trap is in the edge cases like zero distance, negative coordinates, or large floating-point rounding. StealthCoder serves as your safety net if you blank on the formula during the live OA, letting you refocus on implementation.

StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.

If this hits your live OA

You can drill Calculate Distance 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. If you're reading this with an OA window open, you're who this was built for.

Get StealthCoder

Related leaked OAs

⏵ The honest play

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

Blackrock reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Calculate Distance FAQ

Is this just the distance formula from high school?+

Mostly yes. Euclidean distance is sqrt((x2-x1)^2 + (y2-y1)^2). Manhattan is |x2-x1| + |y2-y1|. The OA will tell you which one. Read the problem statement carefully. Don't assume.

What's the trick with Blackrock's version?+

Likely involves applying the formula across many points or minimizing/maximizing distance to some target. Candidates often code the formula correctly but miss the optimization layer. Check if you need to sort, binary search, or iterate smartly.

Do I need to worry about floating-point precision?+

Yes, if the output is a decimal. Return the exact precision the problem asks for. If it says two decimal places, round or truncate accordingly. Test your rounding logic before submitting.

How do I prep this in 48 hours?+

Know Euclidean and Manhattan distance cold. Do two or three geometry problems on LeetCode (e.g., closest-point-to-origin). Then stop and trust your instinct. Geometry problems reward speed, not depth.

Will this be hard?+

Not algorithmically. The math is easy. The difficulty lives in edge cases (zero distance, coordinate boundaries, rounding) and the optimization wrapper around it. Read the constraints and examples twice.

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

OA at Blackrock?
Invisible during screen share
Get it