找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

楼主: Deborah
收起左侧

[Google] Google Interview Question for Dev L

[复制链接]

1178

主题

174

精华

3584

积分

神级会员

Rank: 7Rank: 7Rank: 7

积分
3584
发表于 1-27-2017 01:07 AM | 显示全部楼层

@albin.severinson - the interviewer did mention it was a "bounding" problem. So your hunch is right. Although given the fact the input string length is unknown, I don't see how useful an greedy/opportunistic bounding approach is. Now think of it, if the question was asked "what's the quickest way to find out whether a random string can be rendered on display", that could be just a binary search solution as you suggested.

1154

主题

153

精华

3407

积分

神级会员

Rank: 7Rank: 7Rank: 7

积分
3407
发表于 1-27-2017 01:07 AM | 显示全部楼层

The question is problematic because it shows a lack of understanding of both how text works and how fonts work.

It should at a minimum constrain the characters which are allowed to appear int the string, and also specify the direction the text will be rendered.

1195

主题

170

精华

3596

积分

神级会员

Rank: 7Rank: 7Rank: 7

积分
3596
发表于 1-27-2017 01:07 AM | 显示全部楼层

This has dynamic programming written all over it

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表