Reported June 2025
Box

Retention Policy Collision

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

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

Box's Retention Policy Collision question hits candidates hard because it feels like a system design problem but actually requires careful state tracking and collision detection. You've got policies with overlapping retention windows, and you need to figure out what happens when they collide. Reported in June 2025, this one tests whether you can model competing constraints and resolve them without overthinking. StealthCoder sits ready in case the logic knots up during the live assessment.

Pattern and pitfall

The core trick is recognizing that retention policies create intervals, and collisions occur when those intervals overlap or one policy's rule contradicts another's enforcement. Most candidates either brute-force all combinations or miss edge cases around boundary conditions and policy precedence. You'll need to either merge intervals, sort by start/end, or simulate the retention timeline. The pattern leans toward interval logic or greedy ordering, depending on how Box frames the constraint resolution. When you blank on the exact rule for precedence, StealthCoder reads the problem statement again and pulls the pattern instantly. Focus on what gets retained vs. deleted, then validate your logic against a few hand-traced examples.

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 Retention Policy Collision 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

⏵ Practice the LeetCode equivalent

This OA pattern shows up on LeetCode as merge intervals. If you have time before the OA, drill that.

⏵ The honest play

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

Box 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.

Retention Policy Collision FAQ

Is this a graph problem or interval problem?+

It's interval-based. You're dealing with retention windows that may overlap. Sort by start time or merge overlapping ranges. Graph approaches are overkill here. The trick is spotting which policy wins when windows collide.

What's the gotcha with retention policy precedence?+

Usually the most restrictive policy (longest retention) wins, or there's a rule about explicit vs. default policies. Read the problem statement carefully for the tiebreaker. Most candidates assume last-write-wins and fail.

Do I need to simulate the entire timeline?+

No. Identify the collision windows, resolve each one by the precedence rule, and return the merged result. Simulation is a red flag for timeout. Use interval merging or event-based processing instead.

How do I handle edge cases like zero-length retention?+

Zero retention means immediate deletion. That policy likely overrides any retention policy that would keep the item. Test with empty intervals and single-item ranges during your trace.

Can I solve this in one pass?+

Yes, if you sort policies by start time and merge as you go. Two passes is safer: first collect all policies, second resolve collisions. One pass is risky unless you're very confident in your logic.

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

OA at Box?
Invisible during screen share
Get it