Create 4-Distinct.java

also implemented merge sort (nlgn) to be used with the program