Reported February 2024
Amazon

Fortune Telling

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

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

Amazon's Fortune Telling problem hit the OA circuit in February 2024, and it's a pattern-matching question that trips up candidates who overthink it. You've got an array or sequence, and the task is to identify some underlying structure or predict a next value based on rules you need to infer. The trick isn't complex math or heavy algorithms. It's recognizing what the problem is actually asking before you code. If you blank during the live OA, StealthCoder reads the exact problem text and feeds you the pattern in real time, so you're never stuck guessing.

Pattern and pitfall

Fortune Telling problems typically boil down to sequence analysis or rule detection. You're given data, you spot the pattern (arithmetic progression, geometric progression, alternating logic, or index-based rules), and you either predict the next element or fill in missing values. The pitfall: candidates jump to dynamic programming or complex algorithms when the answer is often just finding the difference between consecutive elements or spotting a repeating cycle. The real work is parsing the problem statement carefully to understand what 'fortune telling' means in that specific context. Whether it's predicting stock prices, sequence completion, or pattern matching, the solution usually lives in simulation or math rather than graph traversal. StealthCoder's value here is catching the exact wording during the assessment so you don't misread the constraints.

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 Fortune Telling 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 Amazon's OA.

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

Fortune Telling FAQ

Is this a hard pattern to spot under time pressure?+

No. The pattern is usually obvious once you read the problem carefully. The risk is misreading it the first time and coding the wrong thing. Slow down, understand what the input and output actually mean, then code.

Should I expect brute force or an optimized solution?+

Depends on array size, which the problem statement will tell you. Most Fortune Telling OA problems don't require advanced data structures. Simulation or a single pass through the data is typical.

How do I prepare in 24 hours without the exact problem?+

Practice sequence problems on LeetCode. Spot arithmetic progressions, geometric progressions, and cycles. Get comfortable with modular arithmetic and simple math. That covers 80% of Fortune Telling variants.

Is this question still being asked at Amazon?+

Yes. February 2024 is recent. Amazon cycles through these pattern-detection problems regularly in their online assessments, especially in early-round coding OAs.

What's the most common mistake candidates make?+

Misunderstanding the input format or output requirement. Read the examples very carefully. The pattern is almost always clear once you've traced through two or three examples by hand.

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

OA at Amazon?
Invisible during screen share
Get it