UNion and intersection of two arrays in linear time and without extra space
Power function in logn for negatives as well