Secure Password
Problem Overview
- Determine the minimum flips in a binary password so it can be split into non-overlapping, even-length substrings where each substring is all 0s or all 1s.
- Input: a string pwd of 0s and 1s; Output: an integer for the minimum number of flips; constraints unspecified.
- Context: Cybersecurity-focused password validation to reduce vulnerability.
- Origin: Asked in Ibm interviews; a common coding interview problem and 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:
