📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
回复: 18
跳转到指定楼层
上一主题 下一主题
收起左侧

发一个Google面经

全局:

2016(4-6月) 码农类General 博士 全职@google - Other - 技术电面  | | Other | 应届毕业生

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
这周二面的Google,太紧张了 脑袋木木的开始聊了聊简历
然后问了很多关于C++的知识,继承多态虚函数之类的,简单提了提虚函数表以及一些hash table的实现

coding题目是这样的,一个字典,里面很多单词,例如
google, leg, about, lemma, apple, time
找这样的pair <A
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
eed到Youtube了。有种
求问有没有类似经历的小伙伴,Youtube和Google貌似在不同的location,难度有什么不一样么

Anyway,已经做好move on的准备了。。总比直接挂了好。。



评分

参与人数 2大米 +43 收起 理由
jjustc + 3 感谢分享!
夏虫不知雪花 + 40

查看全部评分


上一篇:刚出炉的Google OA
下一篇:Bloomberg 4/7 热乎乎 phone interview 面经

本帖被以下淘专辑推荐:

  • · Google|主题: 458, 订阅: 133
推荐
Littles 2016-4-29 07:27:49 | 只看该作者
全局:
  1.         private static int max = 0;
  2.         public static int findPair(String[] words) {

  3.                 if (words == null || words.length == 0) {
  4.                         return 0;
  5.                 }
  6.                 for (int i = 0; i < words.length; i++) {
  7.                         if (words[i].length() < 2) {
  8.                                 continue;
  9.                         }
  10.                         binarySearch(words[i].substring(words[i].length()-2), words, words[i].charAt(0), 0, words.length-1, i);
  11.                 }
  12.                 return max;
  13.         }
  14.        
  15.         public static void binarySearch(String lastTwo, String[] words, char c, int lo, int hi, int i) {
  16.                 if (lo > hi) {
  17.                         return;
  18.                 }
  19.                 while (lo <= hi) {
  20.                         int mid = lo + (hi-lo)/2;
  21.                         if (words[mid].length() < 2) {
  22.                                 binarySearch(lastTwo, words, c, lo, mid-1, i);
  23.                                 binarySearch(lastTwo, words, c, mid+1, hi, i);
  24.                         } else if (words[mid].startsWith(lastTwo)) {
  25.                                 if (words[mid].charAt(words[mid].length()-1) == c) {
  26.                                         max = Math.max(words[i].length()+words[mid].length(), max);
  27.                                 }
  28.                                 binarySearch(lastTwo, words, c, lo, mid-1, i);
  29.                                 binarySearch(lastTwo, words, c, mid+1, hi, i);
  30.                                 return;
  31.                         } else if (words[mid].substring(0,2).compareTo(lastTwo) < 0) {
  32.                                 lo = mid+1;
  33.                         } else {
  34.                                 hi = mid-1;
  35.                         }
  36.                 }       
  37.         }
复制代码
回复

使用道具 举报

全局:
  1.         public int longestPair(List<String> input) {
  2.                 HashMap<String, String> hm = new HashMap<>();
  3.                 int res = 0;
  4.                 //suppose all input are valid. size >= 2
  5.                 for (String s : input) {
  6.                         String _key = s.substring(s.length() - 1) + s.substring(0, 2);
  7.                         System.out.println(_key);
  8.                         if (hm.containsKey(_key)) {
  9.                                 res = Math.max(s.length() + hm.get(_key).length(), res);
  10.                         }
  11.                         String key = s.substring(0, 1) + s.substring(s.length() - 2);
  12.                         String value = hm.get(key);
  13.                         if (value == null || value.length() < s.length()) {
  14.                                 hm.put(key, s);
  15.                         }
  16.                 }
  17.                 return res;
  18.         }
复制代码
回复

使用道具 举报

推荐
Chi2829 2016-4-15 11:17:23 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

🔗
Chi2829 2016-4-8 07:27:05 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

🔗
captor 2016-4-8 12:28:07 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

🔗
 楼主| 进击的菜鸟 2016-4-8 12:29:42 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

🔗
 楼主| 进击的菜鸟 2016-4-8 12:34:01 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

🔗
 楼主| 进击的菜鸟 2016-4-8 13:32:50 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

🔗
captor 2016-4-8 22:34:39 | 只看该作者
全局:
进击的菜鸟 发表于 2016-4-8 13:32
恩,面试官问了一下能不能省些空间,然后又说这个dict是sorted,我才知道原来是排好序的。时间上没改善, ...

哦哦,原来是要省空间。
回复

使用道具 举报

🔗
caiqi8877 2016-4-9 06:17:35 | 只看该作者
全局:
进击的菜鸟 发表于 2016-4-8 13:32
恩,面试官问了一下能不能省些空间,然后又说这个dict是sorted,我才知道原来是排好序的。时间上没改善, ...

楼主,节省空间体现在哪里呢,不太明白
回复

使用道具 举报

🔗
 楼主| 进击的菜鸟 2016-4-9 11:10:52 | 只看该作者
全局:
caiqi8877 发表于 2016-4-9 06:17
楼主,节省空间体现在哪里呢,不太明白

不用建map存map了呀
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

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