its the best algorithm to classify a sample to which category it belongs its based on calculating the distence between user_sample and allothersamples of dataset on the basis of value of k it takes k minimum samples having the minimum distence calculated by algo and which class having the max repitition values in the selected k sample will be the most belonging category of the class