Solve the removing duplicated rows from a matrix problem by using radix sort.