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