DEV Community

Abhishek Shrivastava
Abhishek Shrivastava

Posted on

The Nearest Element

Given an array of integers arr, implement a function that returns the index of the number nearest to the given value n.

Top comments (0)