Skip to main content
Challenges k-NN: classification with nearest neighbours
Artificial Intelligence Medium k-NN algorithm Solves: 6

k-NN: classification with nearest neighbours

Author: CyberSamSU
Points
30

k-NN (k-nearest neighbors) is the simplest classification algorithm: to classify a new point, the k nearest training points to it are found, then the class with the majority vote among them is chosen. Distance is usually measured using Euclidean distance:

masofa(p, q) = sqrt((p.x - q.x)^2 + (p.y - q.y)^2)

Training data (features: weight-index, activity-index):

xyclass
49IT
110IT
15IT
210MUSHUK
97MUSHUK
65MUSHUK

New point (to be classified): (7, 6).

When k = 3 (i.e. based on the 3 nearest neighbors), what class is this point predicted to belong to?

Answer: IT or MUSHUK (case-insensitive).

Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −3 pts Log in
Hint 2 −6 pts Log in
Hint 3 −9 pts Log in
To submit a flag, log in.

First solvers

1. Абдул 08.09.2026
2. Лазиз 04.10.2026
3. Mirjaxon Qaxxarov 26.10.2026
4. Odam 05.11.2026
5. arcanum 11.11.2026
6. hacker_777 19.11.2026