Bloomberg Interview Questions/Q 6

From Software Engineers Wiki
Jump to: navigation, search

Given an unsorted integer array, place all zeros to the end of the array without changing the sequence of non-zero.

For example, [1,3,0,8,12, 0, 4, 0,7] => [1,3,8,12,4,7,0,0,0]

Answer

Refer to Move_Zero_Eelements_in_an_Array_to_the_End

Reference

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox