+ 2
Let's have an array of N elements. And I need to make all 0 elements to come to last in array
Example input : [1,2,0,0,4] Example output : [1,2,4,0,0] Cn I get different logic to solve this?
5 Réponses
+ 5
GURURAJ KL ,
▪︎what language are you talking about?
▪︎and please also show us your attempt!
thanks!
+ 5
GURURAJ KL ,
the solutions we can suggest you are depending on your knowledge level of the language
so when we get the required information from you we can suggest you an adequate solution.
+ 3
Cn u justify the loop which u use to iterate and the conditional statements inside that?