logo

在给定数组中找到 K 个最接近 X 的整数。

Find the K closest integers to X from a given array, where K and X will be user inputs.

题目类型: technical

难度: medium

标签: google, real-question, prepfully

目标公司: Google

← 返回面试题库

在给定数组中找到 K 个最接近 X 的整数。

中等arraybinary-searchsorting

想查看完整答案?

登录匠人学院学习中心,获取 STAR 格式回答和详细技术解析

前往学习中心查看答案