21. Closest Value to a Scalar

Medium

Return the element of vector that is closest to scalar in absolute difference. If there is a tie, return the first such element in vector.

Implement solve(...)