Given an array of 0s (sitting) and 1s (standing), simulate N iterations. In each step, a student's state flips if both neighbors are the same (both 0 or both 1). Boundary students have only one…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.