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

Uber 挂经换米

全局:

2016(10-12月) 码农类General 硕士 全职@uber - 猎头 - 技术电面 Onsite  | | Fail | 在职跳槽

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

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

x
很久没消息,应该就是挂了。觉得他家recruiter很rude,虽然挂了你好歹发封邮件回下啊,结果都是默拒,所以不知道feedback。Phone题目:
calculator I,比leetcode LC 224简单些

Onsite题目:
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
问复杂度,卡了下。这种题建议大家练习的时候要注意,很多人刷过就过了,因为题目不难,但复杂度有时候挺麻烦,可以参考leetcode区的讨论。
  1. import java.util.*;


  2. // This is the text editor interface.
  3. // Anything you type or change here will be seen by the other person in real time.
  4. public class Solution {
  5.     public static void main(String [] args) {
  6.         List<String> input = new ArrayList<String>();
  7.         input.add("Col1,Col2");
  8.         input.add("\"a\",b");
  9.         input.add("\"c,d\", \"e\\\"f");
  10.         print(input);
  11.     }
  12.    
  13.     static void print(List<String> l) {
  14.         if(l != null && l.size() > 0) {
  15.             List<String> cols = parse(l.get(0));
  16.             //System.out.println("[");
  17.             
  18.             List<HashMap<String, String>> res = new ArrayList<HashMap<String, String>>();
  19.             
  20.             for(int i = 1; i < l.size(); i++) {
  21.                  //System.out.println("  {");
  22.                  List<String> words = parse(l.get(i));
  23.                  res.add(new HashMap<String, String>());
  24.                  for(int j = 0; j < cols.size(); j++) {
  25.                      //System.out.println("    " + cols.get(j) + ":" + words.get(j));
  26.                      if(res.get(res.size() - 1).containsKey(cols.get(j))) {
  27.                          throw new IllegalArgumentException("Duplicate col names");
  28.                      } else {
  29.                          res.get(res.size() - 1).put(cols.get(j), words.get(j));
  30.                      }
  31.                  }
  32.                  //System.out.println("  },");
  33.             }
  34.             //System.out.println("]");
  35.             System.out.print(res);
  36.         }
  37.     }
  38.    
  39.     static List<String> parse(String s) {
  40.         List<String> res = new ArrayList<String>();
  41.         if(s != null && s.length() > 0) {
  42.             int i = 0;
  43.             boolean inQut = false;
  44.             StringBuffer sb = new StringBuffer();
  45.             while(i < s.length()) {
  46.                 char c = s.charAt(i);
  47.                 if (c == '"') {
  48.                     if(!inQut) {
  49.                         inQut = true;
  50.                     } else {
  51.                         inQut = false;
  52.                     }
  53.                 } else if (c == '\\' && inQut) {
  54.                     if(i < s.length() - 1) {
  55.                         char next = s.charAt(i + 1);
  56.                         sb.append(next);
  57.                         i++;
  58.                     } else {
  59.                         throw new IllegalArgumentException("Invalid escape");
  60.                     }
  61.                 } else if (c == ',' && !inQut) {
  62.                     res.add(new String(sb));
  63.                     sb = new StringBuffer();
  64.                 } else {
  65.                     if(!(c == ' ' && !inQut)) {
  66.                         sb.append(c);
  67.                     }
  68.                 }
  69.                 i++;
  70.             }
  71.             res.add(new String(sb));
  72.         }
  73.         return res;
  74.     }
  75. }
复制代码

评分

参与人数 2大米 +13 收起 理由
wcongying + 10 欢迎来介绍你知道的情况
runningMajia + 3 感谢分享!

查看全部评分


上一篇:google 跪经
下一篇:OA1 or OA2?糊涂了
🔗
timpark4 2016-11-26 11:07:59 | 只看该作者
全局:
请问lz 一般多长时间不回复就可以认为是挂了呢?
回复

使用道具 举报

🔗
 楼主| zsll 2016-11-26 13:13:18 | 只看该作者
全局:
具体多久算据我不知道,我已经超过三周没消息了,版上一般offer 10天内都知道了。
回复

使用道具 举报

🔗
timpark4 2016-11-26 13:17:02 | 只看该作者
全局:
zsll 发表于 2016-11-26 13:13
具体多久算据我不知道,我已经超过三周没消息了,版上一般offer 10天内都知道了。

我面完也快10天没消息了。。不知道是不是放假会慢点
回复

使用道具 举报

🔗
null_point_exc 2016-11-28 22:19:19 | 只看该作者
全局:
你怎么知道是挂了呢。干嘛不发邮件问一问。万一是忘了,或者备胎了呢
回复

使用道具 举报

🔗
 楼主| zsll 2016-12-3 12:04:53 | 只看该作者
全局:
挂是肯定了,如果offer了hr不会忘一个月的。面完就move on吧,写信只发感谢信,不要发信催结果。
另外忘了说我面试最后聊天没刹住,委婉的问了一个问题:如果过两年无人车多了你们组怎么办。所以我挂我活该啊。
回复

使用道具 举报

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

本版积分规则

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