Minimum steps to reach the end of a string
Filed under Delhivery
The question
Given a string of '*' and '#' characters and ratio variables r1 and r2, find the minimum steps from index 0 to the end. You cannot step on '*'. You can jump from index i to (i+1) or (i+2), or jump to (i+A) if (A/i) >= (r1/r2), where A is the count of primes up to i. Print 'No Way' if unreachable.
No write-up yet. Related questions below have one.
Related Delhivery questions
Collected from public candidate posts and coding forums. Updated Nov 2026.