回复: 19
跳转到指定楼层
上一主题 下一主题
收起左侧

Google On-Campus 两轮

全局:

2015(7-9月) 码农类General 硕士 实习@google - 校园招聘会 - 校园招聘会  | | Other | 应届毕业生

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

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

x
On campus两轮:

(1) Give flights with start and end time. Find maximum number of simultaneous flights. 秒杀 - 先排序start 和 end time(需要标记下类别),maintain一个
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
0">


因第二轮表现不佳,另加一轮面试(还没面)。攒下RP,求水过。

评分

参与人数 1大米 +30 收起 理由
whdawn + 30

查看全部评分


上一篇:Zenefits OA Test 3
下一篇:bb刷GPA吗
推荐
 楼主| crimsonfaith91 2015-10-23 03:41:44 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

推荐
jobseeking 2015-10-23 08:41:28 | 只看该作者
全局:
Thanks, BTW, I am going to post my code here:
  1. /**
  2. * Definition of Interval:
  3. * public classs Interval {
  4. *     int start, end;
  5. *     Interval(int start, int end) {
  6. *         this.start = start;
  7. *         this.end = end;
  8. *     }
  9. */

  10. class Solution {
  11.     /**
  12.      * @param intervals: An interval array
  13.      * @return: Count of airplanes are in the sky.
  14.      */
  15.     public int countOfAirplanes(List<Interval> airplanes) {
  16.         // write your code here
  17.         List<Point> list = new ArrayList<Point>();
  18.         for (Interval interval : airplanes) {
  19.             list.add(new Point(true, interval.start));
  20.             list.add(new Point(false, interval.end));
  21.         }
  22.         Collections.sort(list, new Comparator<Point> () {
  23.             public int compare(Point o1, Point o2) {
  24.                 if (o1.time == o2.time) {
  25.                     return o1.isStart ? 1 : -1;
  26.                 } else {
  27.                     return o1.time - o2.time;
  28.                 }
  29.             }
  30.         });
  31.         int counter = 0;
  32.         int max = 0;
  33.         for (Point p : list) {
  34.             if (p.isStart) {
  35.                 counter ++;
  36.             } else {
  37.                 counter --;
  38.             }
  39.             max = Math.max(max, counter);
  40.         }
  41.         return max;
  42.     }
  43.    
  44.     private static class Point {
  45.         private boolean isStart;
  46.         private int time;
  47.         public Point(boolean isStart, int time) {
  48.             this.time = time;
  49.             this.isStart = isStart;
  50.         }
  51.     }
  52. }
复制代码
回复

使用道具 举报

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

使用道具 举报

🔗
 楼主| crimsonfaith91 2015-9-30 01:23:27 | 只看该作者
全局:
第一题:更加精准的词应该是overlapping,找出flight重叠的最大值。例如[1, 3],[2, 4],[5, 6]。答案是2,因为[2,3]时有 2 flights。
第二题:一秒可以放进去多个。Time是positive integers,不需读取计算机时间。
回复

使用道具 举报

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

使用道具 举报

🔗
 楼主| crimsonfaith91 2015-9-30 10:50:27 | 只看该作者
全局:
最新的word。个人觉得打印最新的word蛮怪的(没技术含量),但面试官要求也没办法。这也就是为何到后面不需要用hashmap记载。。
回复

使用道具 举报

🔗
pigmightfly 2015-9-30 11:18:43 | 只看该作者
全局:
刚收到google on campus interview的邀请。。
问下楼主,google on campus过后还需要 on-site 吗?
回复

使用道具 举报

🔗
 楼主| crimsonfaith91 2015-9-30 11:33:13 | 只看该作者
全局:
找实习不需要。
回复

使用道具 举报

🔗
pigmightfly 2015-9-30 21:06:37 | 只看该作者
全局:

是full-time 全职需要吗?
回复

使用道具 举报

🔗
 楼主| crimsonfaith91 2015-10-1 00:29:48 | 只看该作者
全局:
需要的。加油!:)
回复

使用道具 举报

🔗
caffery24 2015-10-21 11:06:49 | 只看该作者
全局:
求问楼主第二题。。。就是是设计一个什么呢?是会给你一个时间大小x,然后只保留现在的时间到x之间输入的数吗?然后再输出现在的时间输入的所有数字?
回复

使用道具 举报

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

本版积分规则

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