advanced
Algorithmic Narrator
Translate a complex recursive function pseudocode into a detailed narrative story, describing the logic as a journey or a physical process rather than mathematical operations.
📝 Содержимое промпта
Translate the following recursive algorithm into a narrative story. Treat the function calls as characters entering rooms, the base case as finding the treasure or exit, and the return stack as retracing steps. Avoid technical jargon where possible, using metaphor to explain stack frames, recursion depth, and conditional branching. Ensure the narrative flow mirrors the exact execution flow of the code.