Tagged: 

  • Move Zero's to end

     Akash  updated 1 year, 1 month ago 1 Member · 1 Post
  • Akash 

    Administrator
    at

    Given an array of integers, move all zeros present in the array to the end. The solution should maintain the relative order of items in the array.

    For example,

    Input: { 6, 0, 8, 2, 3, 0, 4, 0, 1 }

    Output: { 6, 8, 2, 3, 4, 1, 0, 0, 0 }

Log in to reply.

Original Post
0 of 0 posts June 2018
Now

New Report

Close