Loading Company...
This is a verified interview question from Amazon-ml-summer-school. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Stop and Go" covers key patterns like Other.
"You are given a string `s` representing a sequence of stop and go instructions. The instructions are denoted by the characters 'stop' and 'go'. Your task is to determine the number of times the car stops and goes. The instructions are separated by a newline character. The input string will not contain any leading or trailing whitespace. The instructions will always be in the format 'stop' or 'go'."
Join thousands of developers practicing for Amazon-ml-summer-school.