Reported May 2025
Epifygraph

Request Redirection

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

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

Epify's Request Redirection question hit the assessment feed in May 2025, and it's a straightforward routing problem disguised as system design thinking. You're not building a load balancer. You're figuring out how to map one request type or endpoint to another, handle edge cases in the redirect logic, and do it efficiently. The trap is overcomplicating it. Most candidates spend mental energy on caching or concurrency when the real test is pattern matching and clean state transitions. StealthCoder can spot the redirect rule instantly if you blank on the parsing.

Pattern and pitfall

Request Redirection is almost always a simulation or state-machine problem wrapped in HTTP-flavored language. You'll likely receive a list of redirect rules (old URL to new URL, or request type A to handler B) and need to either apply them, detect cycles, or validate a chain of redirects. The algorithmic core is usually a graph traversal (check for loops), string matching, or a simple mapping lookup. The common mistake is not handling transitive redirects (A redirects to B, B redirects to C) or circular dependencies. Build a map, iterate through redirect chains, and keep a visited set to catch cycles. StealthCoder will parse the rules and trace the chain for you during the live OA if you can't hold the logic in your head under pressure.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Request Redirection 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 passed his OA cold and still thinks the filter is broken.

Get StealthCoder
⏵ Practice the LeetCode equivalent

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

⏵ The honest play

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

Epify reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Request Redirection FAQ

Is this a graph problem or just string matching?+

Both. You're detecting cycles in a directed graph of redirect paths, but the vertices are URLs or request types and edges are rules. Use a visited set and a recursion stack to catch back-edges. If you're asked just to apply redirects, it's a simple loop. If you're asked to validate, it's cycle detection.

What if there's a circular redirect chain?+

Return an error or signal an infinite loop. Keep a visited set during traversal. If you encounter a node you're already in the current path, you've found a cycle. This is the most common edge case Epify tests.

Do I need to optimize for time or just correctness?+

Correctness first. A single pass with a hash map for rules is O(n) and more than enough. Memoizing redirect results is a nice-to-have if you're asked to handle repeated queries, but the problem usually doesn't require it.

How much time should I spend on this during the OA?+

15-20 minutes if you've seen redirect logic before. Read the rules carefully. The parsing is where candidates slip up. Build your map, write the traversal, test on the samples. Don't overthink.

Is this still asked after May 2025?+

Yes. Redirect and routing problems are stable in Epify's rotation. The exact framing changes, but the underlying pattern (cycle detection and chain traversal) stays. Know how to trace a chain and spot loops.

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

OA at Epify?
Invisible during screen share
Get it