Skip to content

PS02: Duplicating zeros | Template for CS02 PS02.

License

Notifications You must be signed in to change notification settings

PlatziMaster/challenge-cs02-02

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PS02: Duplicating zeros

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].

How to submit

  • Complete the function duplicate_zeros under solution.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.py will be run against all input test cases inside test_cases/
  • Enjoy 💕!

Debugging

  • You can run a test case py running python grader.py < test_cases/TEST where TEST is the particular test case you want to run.

Releases

No releases published

Packages

No packages published

Languages