when we choose the algorithm will find the three nearest neighbors of the green heart in order to classify it to either the diamond class or the star class in our diagramthe three nearest neighbors of the green heart are one diamond and two stars thereforethe algorithm will classify the heart with the star class