Lets Assume we have an array of arrays , containing some numbers:
let arr = [ [1,2,3] ,[5,6,9] ,[2,1,3],[3,2,4],[4,3,5], [6,9,5] ]
here arr[0] and arr[2] have the same associated values (1,2,3) though the position is not the same.
same arr[1] and arr[5] have the same associated values (5,6,9) though the position is not the same
I want to remove duplicates , and want results :
final= [ [1,2,3] ,[5,6,9] ,[3,2,4],[4,3,5] ]
any solution in javascript or python will be great, other languages like c++ are also welcomed( i have very little knowledge of that), Pseudocode is also helpful.
I want to know what will be the best BIG-O algo for this.