CS-OA cs-vo Faang

google vo record-北美google面经-狗家面试真题-google面试真题-谷歌面试真题

谷歌的面试十分的标准,40分钟大概只有一个coding,题目如下

Imagine a keyboard user interface on a tablet. A user taps their finger on a particular point on the screen.
Write a function that maps the coordinate of that tap to the character that the user meant to press.

The main challenge here is to describe a generic, efficient data structure and corresponding algorithm
that maps all points on a 2D screen onto keys on a keyboard.

Example:
input: x=0.6, y=1.2

output: a
An example layout from a real phone:

[q] [w] [e] [r] [t] [y] [u] [i] [o] [p]
[a] [s] [d] [f] [g] [h] [j] [k] [l]
[z] [x] [c] [v] [b] [n] [m]
[ ] [ ] [space] [ ] [ ]
[123] [emoj] [space] [|] [retr]

这个问题是一个实际的编程挑战,涉及到触摸屏幕键盘的用户界面设计。它考验了几个方面:

  1. 算法设计:要求开发者能够编写一个函数,这个函数能够接收屏幕上的触摸坐标,并将其转换为相应的键盘字符。这要求理解和应用数据映射的基础概念。
  2. 数据结构应用:有效的数据结构对于处理这类问题至关重要,以便快速定位和检索信息。此问题鼓励思考如何存储键盘布局,以便快速查询。

如果你对面试中的代码部分十分的苦恼,其他部分你能够非常好的应对的话,那么推荐我们的面试辅助服务。面试辅助专注于解决您面试中的代码问题。

如果您存在口语或者沟通时不足够自信等问题,我们还可以提供代面试服务。

点击查看我们的服务详情和报价

Leave a Reply

Your email address will not be published. Required fields are marked *