找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

楼主: Deborah
收起左侧

[Google] Google Interview Question for Dev L

[复制链接]

1117

主题

164

精华

3414

积分

神级会员

Rank: 7Rank: 7Rank: 7

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

Hi @ChrisK
could you please explain your code in layman language, so that i'll be able understand.

1139

主题

189

精华

3647

积分

神级会员

Rank: 7Rank: 7Rank: 7

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

@srterpe The interviewer was asking whether there is a faster way to narrow down the font size range to try. He said if there are 1000+ font sizes is there a better way.

1152

主题

175

精华

3553

积分

神级会员

Rank: 7Rank: 7Rank: 7

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

@LinkSausage What do you think about bounding the font sizes you need to consider and then doing binary search?

In other, words find a font that will for sure fit and one that will for sure not fit. Then do binary search on the remaining fonts. You could maybe even improve the speed by using the average font size somehow.

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

本版积分规则

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