Given an array of integers of size n. Assume 0 as invalid number and all other as valid number. Write a program that modifies the array in such a way that if next number is valid number and is same as current number, double the current number value and replace the next number with 0. After the modification, rearrange the array such that all 0s are shifted to the end and the sequence of the valid number or new doubled number is maintained as in the original array
Answers
Answered by
0
.......... what is the meaning ofthequestion
Similar questions