Implementation for the Kolmogorov-Smirnov Test.