algo notes to k means