Learn basic concept of c , c++ and python programming in regularcodes.com

Spread the post

Print unique elements in array

Write an efficient algorithm to print unique elements of given array.

For example

Assume that given array contain following nodes [1,2,3,4,2,3,5].

Array elementsmaindata [0] 1 [1] 2 [2] 3 [3] 4 [4] 2 [5] 3 [6] 5size (int) =7 Uniquemaindata [0] 1 [1] 2 [2] 3 [3] 4 [6] 5size (int) =7 transfo

program to print unique elements in given array. Time complexity O(n^2).

Output

View process.

View steps of execution

Submit your solution in comment section.

Spread the post

Recommended Posts: