id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

simona1@sfusd.edu arraylist2 > removeFirst0s
prev  |  next  |  chance

Returns a new ArrayList with the leading zeros of the ArrayList argument removed.


removeFirst0s([0, 0, 1, 3, 0, 5, 7]) → [1, 3, 0, 5, 7]
removeFirst0s([0, 0, 0, 0, 1, 3, 99, 0]) → [1, 3, 99, 0]
removeFirst0s([1, 3, 3, 6, 99, 99]) → [1, 3, 3, 6, 99, 99]

...Save, Compile, Run (ctrl-enter)

public ArrayList <Integer> removeFirst0s(ArrayList <Integer> a) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Post-solution available

Copyright Nick Parlante 2017 - privacy