Redian新闻
>
贡献个facebook电话interview
avatar
贡献个facebook电话interview# JobHunting - 待字闺中
z*y
1
前些日子面的,尽管code都写出来了 但那个面试官好像很不喜欢Java,我的code都用
Java写的
最后也没给下一轮
1) Locate a substring within a string. (Find the first occurance of
needle in haystack, or return null.)
char* strstr(char* haystack, char* needle) {
}
mention了一下KMP算法,然后用那个最直接的方法写的code. 他该不会是想让我把KMP
算法在interview里敲出来吧
2)/*
* Given an array and a value, remove all instances of that
* value in place and return the new length. The order of
* elements can be changed. It doesn't matter what you leave
* beyond the new length.
*/
size_t remove_elem(T* array, size_t len, T elem) {
}
这个题目他是想让用quick sort 类似的方法 从两头同时开始找,然后换,尽量减少交
换的次数
avatar
a*0
2
第一题suffix tree如何?

KMP

【在 z*******y 的大作中提到】
: 前些日子面的,尽管code都写出来了 但那个面试官好像很不喜欢Java,我的code都用
: Java写的
: 最后也没给下一轮
: 1) Locate a substring within a string. (Find the first occurance of
: needle in haystack, or return null.)
: char* strstr(char* haystack, char* needle) {
: }
: mention了一下KMP算法,然后用那个最直接的方法写的code. 他该不会是想让我把KMP
: 算法在interview里敲出来吧
: 2)/*

avatar
z*y
3

suffix tree肯定行,不过电话interview这点时间 建树的code还是挺challenging的
呵呵
suffix tree的code不太好写
我觉得他可能就是想让我写那个KMP算法

【在 a*********0 的大作中提到】
: 第一题suffix tree如何?
:
: KMP

avatar
g*k
4
电话里写KMP不太可能吧。
还会有更好的。继续努力

KMP

【在 z*******y 的大作中提到】
: 前些日子面的,尽管code都写出来了 但那个面试官好像很不喜欢Java,我的code都用
: Java写的
: 最后也没给下一轮
: 1) Locate a substring within a string. (Find the first occurance of
: needle in haystack, or return null.)
: char* strstr(char* haystack, char* needle) {
: }
: mention了一下KMP算法,然后用那个最直接的方法写的code. 他该不会是想让我把KMP
: 算法在interview里敲出来吧
: 2)/*

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。