Find Minimum Keypad Click Count (AMZ CN)

Problem Overview

  • Find the minimum keypad click count to type a given lowercase string by choosing a valid 9-button layout.
  • Input: letters (a–z). Output: smallest total presses. Constraints: 9 buttons, up to 3 letters each, all 26 letters used once.
  • Real-world context: faster multi-tap typing on a customizable supplemental keypad for Amazon Shopping devices.
  • An Amazon interviews coding interview problem and optimization-focused interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: