Input 2 7 3 0 7 0 2 4 0 1 0 Expected Output 3 1 1 1 1 1
Note: You can also use F5 to update the logs. This would also retain cursor position while scrolling.