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

谷歌电面

 
🔗
hck94829 2016-11-13 11:19:30 | 只看该作者
全局:
jksadfkjshfdkjsdfh
回复

使用道具 举报

🔗
ifrank0098 2016-11-13 11:25:26 | 只看该作者
全局:
thank you for sharing~~~
回复

使用道具 举报

🔗
youlovethis 2016-11-13 11:29:30 | 只看该作者
全局:
kkkkkkkkkkkkkkkk
回复

使用道具 举报

🔗
sunnyroom 2016-11-13 12:29:48 | 只看该作者
全局:
看看楼主的问题
回复

使用道具 举报

🔗
zzgzzm 2016-11-13 12:42:20 | 只看该作者
全局:
Good luck for onsite! 都是经典的题目
  1. vector<int> BST2Array(Node* r) {
  2.   if (!r) return {};
  3.   auto L(BST2Array(r->left)), R(BST2Array(r->right));
  4.   L.push_back(r->val); L.insert(L.end(), R.begin(), R.end());
  5.   return L;
  6. }

  7. typedef pair<vector<int>::iterator, vector<int>::iterator> PI;
  8. struct Comp { bool operator()(PI& a, PI& b) { return *a.first > *b.first; } };

  9. vector<int> sortSorted(vector<vector<int>>& a) {
  10.   vector<int> res; priority_queue<PI, vector<PI>, Comp> pq;
  11.   for (auto& x:a) if (!x.empty()) pq.emplace(x.begin(), x.end());
  12.   while (!pq.empty()) {
  13.     auto c = pq.top(); res.push_back(*c.first); pq.pop();
  14.     if (++c.first != c.second) pq.push(c);
  15.   }
  16.   return res;
  17. }
复制代码
回复

使用道具 举报

🔗
huoshankou 2016-11-13 12:59:48 | 只看该作者
本楼:
全局:
字数字数
回复

使用道具 举报

🔗
icetraveller 2016-11-13 13:00:51 | 只看该作者
本楼:
全局:
楼主加油
回复

使用道具 举报

🔗
youngxie 2016-11-13 13:08:00 | 只看该作者
全局:
谢谢楼主!祝楼主onsite好运!
回复

使用道具 举报

🔗
xyyx 2016-11-13 13:46:42 | 只看该作者
全局:
感谢分享,也祝愿onsite顺利
回复

使用道具 举报

🔗
jooppp 2016-11-13 14:02:53 | 只看该作者
全局:
ddddddddddddddddddddddd
回复

使用道具 举报

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

本版积分规则

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