File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -47,12 +47,12 @@ Output
47
47
3542200
48
48
```
49
49
## Explanation
50
- Initialize a variable count with a value equal to zero.<br >
51
- Make a function named pushZeroToEnd and input an array.<br >
52
- Traverse through the array and check each element whether it is equal to zero or not.<br >
53
- If the element is not equal to zero, put the element at the countth position of the array.<br >
54
- Increase the value of count by 1.<br >
55
- At last, fill the remaining positions of the array with 0.<br >
50
+ - Initialize a variable count with a value equal to zero.<br >
51
+ - Make a function named pushZeroToEnd and input an array.<br >
52
+ - Traverse through the array and check each element whether it is equal to zero or not.<br >
53
+ - If the element is not equal to zero, put the element at the countth position of the array.<br >
54
+ - Increase the value of count by 1.<br >
55
+ - At last, fill the remaining positions of the array with 0.<br >
56
56
57
57
## Time Complexity
58
58
Since we will be traversing the whole array twice therefore the time complexity of algorithm would be:
You can’t perform that action at this time.
0 commit comments