Given a list of integers arr, modify it such that every 0 appears twice while maintaining the original list size. Modify the list in place.
Example 1:
- Input:
[1,0,2,3,0,4,5,0] - Output:
None - Why?: After calling your solution, the input array is modified to
[1,0,0,2,3,0,0,4].
- Complete the function
duplicate_zerosundersolution.py - Push your changes to
master. - Your code must be readable, pylint checks will be run against each push.
- Your code must pass all test cases.
grader.pywill be run against all input test cases insidetest_cases/ - Enjoy 💕!
- You can run a test case py running
python grader.py < test_cases/TESTwhereTESTis the particular test case you want to run.