← Amazon questions
CodingHard

Minimum segments of string into prime numbers

Filed under Amazon

Given a string representing a large integer, find the minimum number of splits required such that each resulting segment is a prime number between 1 and 10^6. Return -1 if it is not possible.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.