How can i find Set of Unique Elements In 2d Vector in most EFFICIENT WAY?? Vector Declaration :
Example : Input : 1,2,3,4 1,4,3,2 1,2,3,4 5,4,2,9 8,6,5,4 1,2,3,4 Output : 1,2,3,4 1,4,3,2 5,4,2,9 8,6,5,4 asked 10 Aug, 14:40

You can make trie type structure or you can also use unordered map.. For trie type structure, at each level you would store a column in sorted manner and insert and find element accordingly.. This link may help.
This is how your trie will look like.. Hope this will help.. answered 10 Aug, 15:57

Do you want to perform some operations on the resultant 2D matrix? How about inserting them in a set of vectors. I guess you want a more efficient way compared to NlogN.(N is the unique number of elements in set). Still thinking an efficient way.:) answered 10 Aug, 15:03
