📣 Back to School开学季 - VIP通行证5折优惠!蓝莓、Offer多多同步优惠
回复: 26
跳转到指定楼层
上一主题 下一主题
收起左侧

[twosigma面经集合]收到了大魔王的onsite邀请 顺便发一波电面面经

 
全局:

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

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

x
讲真 面twosigma真的不是我的本意 对于一个转专业的学生来说 这种公司真的是去找虐 我把简历放到学校的link board上 hr来找我的我 电面还是那些题:
我把自己准备时候的面经打包发上来 有些东西是我自己的理解 可能不太对或者不准确
今天收到了onsite邀请 本着去纽约旅游一波的心态还是觉得去一趟吧
  • Hashmap 的 collision control?  How does Hashtable works  (follow up: how does open addressing works?   What's the problem of linear probing?
How does hash table works?
        1. A table of buckets (an array of buckets), using the array index to denote each bucket.
        2. For each entry <key, value>, it goes to one of the buckets, the bucket index is determined by a hash function applied on key and the size of array.

Key ———(hash func) —> hash ——-(get_index  hashcode % array.length())——->index——>bucket

hash map can only hash one null key, and it’s always mapped to bucket 0.


collision control:
- (close addressing) Separate chaining: they will be assigned to the list
-  open addressing:starting with the hashed-to slot and proceeding in some probe sequence, until an unoccupied slot is found.

Linear probling(open addressing):
        1. Probe: To give a key x, and get its index h(x); and continue to the adjacent cells h(x) + 1, h(x) + 2 …if find a cell whose stored key is x, then returned the value from that cell. Otherwise, if an empty cell is found, then return the key is not present in the dictionary.
            2. Insertion: follow the same steps: find the an empty cell or a cell whose stored key is x:
if the insertion cell cause the load factor of the table to grow above the threshold, will cause rehashing:  the whole table will be replaced by a new table(bigger one). Normally, if the size is lager than 1/2, causing the load factor to stay between 1/4 to 1/2.
        3. Deletion:  
                Lazy deletion: key-value pairs is removed by replacing the value by a special flag value indicating a deleted key.  But there’s some shortcomings for this
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
s.push(tmp);
                }
                else if(sign == '-') {
                    ss.push(-tmp);
                }
                if(sign == '*') {
                    int t = ss.top();
                    ss.pop();
                    ss.push(t * tmp);
                }
                else if(sign == '/') {
                    int t = ss.top();
                    ss.pop();
                    ss.push(t / tmp);
                }
                tmp = 0;
                sign = s[i];
            }
        }
        while(!ss.empty()) {
            res = res + ss.top();
            ss.pop();
        }
        return res;
    }
};


评分

参与人数 15大米 +254 收起 理由
sam2015 + 5 感谢分享!
allenxn24 + 3 感谢分享!
文体两开花 + 5 欢迎来一亩三分地论坛!
luochenhuan + 2 感谢分享!
OO0OO + 6 感谢分享!

查看全部评分


上一篇:Amazon 两轮OA以后被录取???+吐槽
下一篇:发一个非常迷的微软on campus...
推荐
listen8019 2016-11-7 08:48:37 | 只看该作者
全局:
忆梦前尘 发表于 2016-11-7 08:25
问个问题。。。two sigma是HR打电话过来就相当于电面了是么?还是像其他家HR一样随便聊聊

和HR随便聊聊,不涉及面试,顺便发给你OA,再顺便谢鸭妈脏面经。

评分

参与人数 1大米 +10 收起 理由
忆梦前尘 + 10 谢谢你的介绍!

查看全部评分

回复

使用道具 举报

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

使用道具 举报

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

使用道具 举报

🔗
zxyzzj 2016-11-5 01:38:42 | 只看该作者
全局:
感谢分享,好东西~
回复

使用道具 举报

🔗
zyoppy008 2016-11-5 02:15:08 | 只看该作者
本楼:
全局:
怒赞 备用
回复

使用道具 举报

🔗
leixiang5 2016-11-5 04:16:13 | 只看该作者
全局:
羡慕楼主~ 我往死里骚扰。就是不给我面试~
回复

使用道具 举报

🔗
oily 2016-11-6 22:19:51 | 只看该作者
全局:
mark,感谢楼主的信息
回复

使用道具 举报

🔗
syjohnson 2016-11-7 02:47:41 | 只看该作者
全局:
感谢lz,祝lz onsite顺利! 下周正好要面,来看下面经
回复

使用道具 举报

🔗
jiamuxeuer 2016-11-7 03:11:14 | 只看该作者
全局:
楼主,可以说一下你的OA遇到什么题了么?地里搜不到最近的Two sigma OA~非常感谢楼主。 祝楼主onsite顺利!
回复

使用道具 举报

🔗
海盗包子 2016-11-7 06:36:28 | 只看该作者
全局:
祝楼主好运~先码上,和h r发了13封邮件还没确定下phone screen。。。不知道还能不能用得上
回复

使用道具 举报

🔗
忆梦前尘 2016-11-7 08:25:44 | 只看该作者
全局:
问个问题。。。two sigma是HR打电话过来就相当于电面了是么?还是像其他家HR一样随便聊聊
回复

使用道具 举报

🔗
finerve 2016-11-7 08:46:59 | 只看该作者
全局:
这些基础知识,即使不是转专业的,也要好好准备..会写程序和会回答概念问题真的是两回事..
回复

使用道具 举报

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

本版积分规则

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