oh ok thanks,actually i meant if we taking both the cases where the inputted duplicate terms can be consecutive as well as in random order and then it can be printed without the duplicate numbers.
actually i meant if we taking both the cases where the inputted duplicate terms can be consecutive as well as in random order
That is the second case which refers to "duplicate terms anywhere in the array." Note that anywhere includes the possibility of "next to" or "consecutive."