d***r 发帖数: 40 | 1 发现版上只有12年的两个帖子有
不知道最近电面过他家的能不能说说面经
多谢! | d********t 发帖数: 9628 | 2 膜拜大牛!
【在 d***r 的大作中提到】 : 发现版上只有12年的两个帖子有 : 不知道最近电面过他家的能不能说说面经 : 多谢!
| s***y 发帖数: 10 | 3 我面的是intern的skype interview,不知道对楼主有没有帮助。
implement一个regular expression。
支持. * +就好了。
match('abba', 'abba') == true
match('cda', 'adb') == false
match('.*abc', 'abc') == true
match('.*abc', 'ababc') == true
match('.b*a+', 'caaa') == true
match('bb+a*', 'baa') == false
当时比较晕,答的很不好,也就没第二轮了。 | h*****n 发帖数: 92 | 4 intern店面问这个,有点难
【在 s***y 的大作中提到】 : 我面的是intern的skype interview,不知道对楼主有没有帮助。 : implement一个regular expression。 : 支持. * +就好了。 : match('abba', 'abba') == true : match('cda', 'adb') == false : match('.*abc', 'abc') == true : match('.*abc', 'ababc') == true : match('.b*a+', 'caaa') == true : match('bb+a*', 'baa') == false : 当时比较晕,答的很不好,也就没第二轮了。
| s***y 发帖数: 10 | 5 恩,然后我的那个interviewer还没有任何feedback,从coderpad上来看,他可能还在
干自己的事儿,就一会儿切走一会儿切回来。我问他能不能给hint,他说没法给。。
【在 h*****n 的大作中提到】 : intern店面问这个,有点难
| j**********3 发帖数: 3211 | | u*****n 发帖数: 126 | 7 //1' Edit Distance
// cats //
// carts add 26*4 = 104
// cat deletion 3
// bats modification 78
// dict = [ "cat", "bat", "batt", "beetle" ]
// similar(string q) => words from dic that are <= 1 edit distance from q
// similar("bat") => ["cat", "bat", "batt"]
/*
Often, we want to encode raw IDs in our database by hiding them behind some
2-way decodeable hash. So, a URL which would have at one time been:
https://www.airbnb.com/rooms/848662
becomes
https://www.airbnb.com/rooms/kljJJ324hjkS_
We decode the ID kljJJ324hjkS_ to 848662 on our backend and serve the
relevant content. at some point, we start getting 404 errors from clients
requesting a certain URL of the form
https://www.airbnb.com/rooms/kljjj324hjks_
This can happen if certain clients, email services, or url shorteners "
sanitize" the url. Unfortunately, this change breaks decoding and the
resource cannot be found.
To assess how big of a deal this is, we may want to recover the IDs of the
targets that were 404ing.
Your task:
Given a method decode(testEncStr) which will return the decoded int id if
testEncStr is decodeable or will throw an exception or return null (
depending on the language) if not, implement a new method decodeFind(String
badEncStr) which takes a string and returns the decoded int id.
*/ | w***n 发帖数: 2474 | 8 Just curious, if it is just the case difference that caused the problems,
would be nice to simply reprocess the back end database and make all the
keys lower-case based? |
|