There are two arrays.
int arr1[5] = { 3, 5, 2, 5, 2}
int arr2[5] = { 2, 3, 5, 5, 2}
The arrays will be called similar if they contain same number of elements
equally.
Write the pseudo code to check this ?
not allowed to use sorting and hashtable.naive approach O(n^2) NOTE: Xoring , sum wont work. we can use O(n) space , using index as elements in the array. but if it has negative number then it will fail for eg arr1 has -1,... and arr2 has 1,..... -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
