โ† Amazon questions
CodingMediumReported in a candidate post, May 2022

Select 3 pages with alternating types

Filed under Amazon

Given a binary string, count the number of ways to pick three indices (i < j < k) such that the values at these indices form an alternating pattern (010 or 101).

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.