
Learning anew. #100Devs | Civil/Software Engineer | @UBuffalo Alumnus | Attempting to learn Arabic and Russian
- Tweets1.3K
- Following1K
- Followers1.3K
- Likes6.8K
![my awful explanation of why my original attempt was wrong: my original attempt on June 30 2022 I think I was just missing the i-- that the actual solution below provides, and that's due to reducing the size of the array that will be looped throiugh due to removing the zero, which it appears I forgot to do. essentially, the array being looped through is getting smaller and me not puttin i-- neglected the second of two zeros in a row becauyse it would skip it when the second zero would take the place of the first. basically if we had [0, 0, 1, 0] the first zero had index 0 but when the loop was done it would move to index 1, which is now the 1 number instead of the second zero that follows the first, which has since been removed.](https://pbs.twimg.com/media/FWhb93yX0AczdC9.png?name=small&format=webp)
ALT my awful explanation of why my original attempt was wrong: my original attempt on June 30 2022 I think I was just missing the i-- that the actual solution below provides, and that's due to reducing the size of the array that will be looped throiugh due to removing the zero, which it appears I forgot to do. essentially, the array being looped through is getting smaller and me not puttin i-- neglected the second of two zeros in a row becauyse it would skip it when the second zero would take the place of the first. basically if we had [0, 0, 1, 0] the first zero had index 0 but when the loop was done it would move to index 1, which is now the 1 number instead of the second zero that follows the first, which has since been removed.















