查看: 41667| 回复: 98
跳转到指定楼层
上一主题 下一主题
收起左侧

[其他] 有人知道GG的short survey and coding sample 是神马么

 
全局:

2015(10-12月)-CS硕士+fresh grad 无实习或全职 | Other| 码农类General全职@google

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

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

x
上周电面的狗。。T T 然后跪了。。太弱了。。
刚才接到HR噩耗之后又收到g家的邮件。。。标题是Thanks for Applying to Google: Next Steps
邮件里面有两个link关于short survey and coding sample, coding sample是60分钟2道题,语言不定
想问问有同学做过这个么。。。T . T
. 1point3acres.com

补充内容 (2015-12-3 03:56):. 1point 3 acres
感谢楼下二楼的complete_46的补充题目。。。后面已经有小伙伴补充了第二道题的解法~

评分

参与人数 1大米 +2 收起 理由
cytty + 2 给你点个赞!

查看全部评分


上一篇:求各位大大帮忙看下简历,简历被拒得都看不到希望了
下一篇:提供ebay内推

本帖被以下淘专辑推荐:

推荐
complete_46 2015-11-13 09:51:49 | 只看该作者
全局:
我来发个面经攒点人品。。。 ..
. 1point3acres
1 给一个数字,比如12345,可以duplicate任意一位,比如第一位就得到112345第二位就得到122345,以此类推,然后求这些duplicate中最大的
2 给一个file system like:

dir
ddir
  a.txt
  b.jpeg
  c.gif
ddir2
dddir
ddddir
  aaa.exe

求绝对路径最长的图像文件(扩展名为.jpeg .gif .png)的绝对路径长度 (/dir/ddir/b.jpeg, 长度=15)

评分

参与人数 10大米 +64 收起 理由
cxynthia + 1 给你点个赞!
unastrong + 3 给你点个赞!
OfferInundated + 3 给你点个赞!
scuate + 3 感谢分享!
末日修士 + 25 感谢分享!

查看全部评分

回复

使用道具 举报

推荐
菠萝君 2015-11-25 08:49:01 | 只看该作者
全局:
    public static int[] duplicateNumber(int[] input){. 1point 3 acres
            int[] result = new int[input.length+1];
            if(input == null ||input.length == 0) return new int[0];. Χ
            if(input.length == 1) return new int[]{input[0],input[0]};
            int i = 0;
            int j = 0;
            while(i < input.length - 1){
                    if(input[i] <= input[i+1]) {
                            result[j++] = input[i++];
                    }
                    else{
                            result[j++] = input[i];
                            while(j < result.length)
                                    result[j++] = input[i++]; ..
                            return result;
                           
                    }
                   
            }. ----
            result[j] = input[input.length - 1];
            result[j+1] = input[input.length - 1];
            return result;
    }
回复

使用道具 举报

推荐
菠萝君 2015-11-25 11:50:57 | 只看该作者
全局:
static int max = Integer.MIN_VALUE;
    public class TreeNode{
            String val;
            LinkedList<TreeNode> children;
            TreeNode parent;
            int indexOfStart;
           
            public TreeNode(String val,TreeNode parent, int indexOfStart){
                    this.val = val;
                    children = new LinkedList<TreeNode>();
                    this.parent = parent;
                    this.indexOfStart = indexOfStart;
            }.--
    }
   
    public   TreeNode parseString(String str){
            if(str == null || str.length() == 0) return null;
            String[] string = str.split("\n");
            TreeNode root = new TreeNode("",null,-1);
            TreeNode current = root;.1point3acres
              for(String s :string){
                    int j = 0;
                    while(s.charAt(j) == ' '){
                            j++;.1point3acres
                    }
                    TreeNode temp = new TreeNode(s, current, j);
                    if(j == current.indexOfStart+1){
                            current.children.add(temp);
                    }
                    else{. 1point3acres.com
                            while(j != current.indexOfStart+1){.1point3acres
                                    current = current.parent;
                            }
                            current.children.add(temp);
                    }
                    current = temp;
            }
              return root;. From 1point 3acres bbs
    }
   
    public static void helper(TreeNode root,int length){
            length += root.val.length() - root.indexOfStart;
            if(length > max){.--
                    max = length;
                    System.out.println(root.val);-baidu 1point3acres
                    System.out.println(max);
            }
            for(int i = 0; i < root.children.size(); i++){
                    helper(root.children.get(i),length+1);
            }
    }

就是建一个tree 然后dfs 搜索 最后返回max

下午同学写了,第一题的输入实际上是一个int 所以要把每一个数字拆出来。第二题的话他好像要求只是jpeg png 和gif 后缀的,所以在我的代码基础上加一个后缀的判断就好了,不是这个后缀的直接就不放到tree里就好了。这个代码应该是没有问题的

评分

参与人数 3大米 +16 收起 理由
黄小舒 + 3 很有用的信息!
victory0603 + 3 感谢分享!
cancerlk + 10 感谢分享!

查看全部评分

回复

使用道具 举报

🔗
complete_46 2015-11-10 06:20:30 | 只看该作者
全局:
我也收到了,同求啊
回复

使用道具 举报

🔗
天空无语 2015-11-12 05:54:03 | 只看该作者
本楼:
全局:
同问。。
回复

使用道具 举报

🔗
liranxixi 2015-11-14 08:15:23 | 只看该作者
全局:
我也收到了!之前从没听人提起过啊啊啊……
回复

使用道具 举报

🔗
liranxixi 2015-11-16 13:36:03 | 只看该作者
全局:
complete_46 发表于 2015-11-13 09:51-baidu 1point3acres
我来发个面经攒点人品。。。. From 1point 3acres bbs

1 给一个数字,比如12345,可以duplicate任意一位,比如第一位就得到112345 ...

求问第二题是用什么形式传进来的呀?然后第一题是不是只要找到第一个降序位就可以了?谢谢你!
回复

使用道具 举报

🔗
complete_46 2015-11-16 15:15:23 | 只看该作者
全局:
liranxixi 发表于 2015-11-16 13:36
求问第二题是用什么形式传进来的呀?然后第一题是不是只要找到第一个降序位就可以了?谢谢你!

第一题我直接brute force了,没细想

第二题传进来一个大String ,含有\n和空格,需要自己parse
回复

使用道具 举报

🔗
liranxixi 2015-11-16 15:35:56 | 只看该作者
全局:
complete_46 发表于 2015-11-16 15:15
第一题我直接brute force了,没细想. 1point 3acres

第二题传进来一个大String ,含有\n和空格,需要自己parse

好的哈谢谢啦!问一下那你现在已经有电面了嘛?
回复

使用道具 举报

🔗
waigx 2015-11-19 03:35:02 | 只看该作者
全局:
complete_46 发表于 2015-11-13 09:51
我来发个面经攒点人品。。。
. 1point3acres.com
1 给一个数字,比如12345,可以duplicate任意一位,比如第一位就得到112345 ...

一样的题目。求问后来怎么样了?HR 联系你了么?
回复

使用道具 举报

🔗
waigx 2015-11-19 03:35:10 | 只看该作者
全局:
complete_46 发表于 2015-11-13 09:51.1point3acres
我来发个面经攒点人品。。。
. check 1point3acres for more.
1 给一个数字,比如12345,可以duplicate任意一位,比如第一位就得到112345 ...

一样的题目。求问后来怎么样了?HR 联系你了么?
回复

使用道具 举报

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

本版积分规则

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