Get Min Time
Reported by candidates from Publicis Sapients's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Publicis Sapient asked this in March 2025, and candidates are hitting it without a clear pattern clue. "Get Min Time" sounds like an optimization problem, likely involving scheduling, traversal, or task execution. You're probably looking at a graph, simulation, or greedy approach. If the problem asks you to minimize time across operations, states, or movements, there's usually a single insight that flips the whole thing. StealthCoder will catch that insight live if your brain blanks under pressure.
Pattern and pitfall
Without the full problem text, the pattern is likely one of three: binary search on the answer (guess a time, verify feasibility), greedy (always pick the next best move), or shortest-path (BFS or Dijkstra on a state graph). The trick is usually recognizing what you're optimizing over. Are you minimizing total time across parallel tasks? Time to reach a goal state? Time to complete a sequence? Once you identify the state space and the transition cost, the algorithm follows naturally. StealthCoder reads the problem fresh and flags the pattern instantly, so you're never guessing the high-level approach.
If this hits your live OA and you blank, StealthCoder solves it in seconds, invisible to the proctor.
You can drill Get Min Time 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 by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it.
Get StealthCoderYou've seen the question.
Make sure you actually pass Publicis Sapients's OA.
Publicis Sapients reuses patterns across OAs. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Get Min Time FAQ
Is this a binary search problem?+
Very likely. If you need to find the minimum time T such that some condition holds, binary search on T and check feasibility. That's the pattern Publicis Sapient leans on for "min time" problems. Check if the naive greedy answer gives you TLE, then binary search is your next move.
What's the gotcha with time-based problems?+
Candidates often code a linear simulation first, which passes small cases but times out at scale. The gotcha is recognizing you need to either binary search the answer or model it as a shortest-path problem with BFS. Read the constraints carefully. If N is large (10^5 or more), linear won't cut it.
How do I prepare in 24 hours if I don't have the exact problem text?+
Study binary search on the answer (classic LeetCode 875, 1891, 1760). Learn to recognize when feasibility checking beats simulation. Practice modeling time optimization as a state-space search. That covers 90% of Publicis Sapient's "min time" problems.
Should I expect edge cases with zero or infinite time?+
Probably. Check bounds: can time be zero? Can it be unbounded? Off-by-one errors on the binary search bounds kill candidates here. Test your binary search carefully, especially the mid calculation and the left/right convergence logic.
Is this about parallelism or sequential execution?+
That's the core question. If tasks run in parallel, you're minimizing max time (bottleneck). If sequential, you're summing time or finding the critical path. The problem wording will say "simultaneously," "in parallel," or "one at a time." That single word flips the entire solution.