Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
behdad
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
behdad
3y ago
This is very nice indeed. I should mock-interview someone using it.
32.
▲
by
behdad
3y ago
> How do you measure the question's success? Is there some kind of feedback you get about how the person you made a decision about went on to perform? Not the latter. However, there are five interviews that each candidate goes throu
33.
▲
by
behdad
3y ago
You are absolutely right. I should have been more clear about the dictionary size being large compared to n, and similar about the length of the longest word in it for all my analysis to follow.
34.
▲
by
behdad
3y ago
Multiplication.
35.
▲
by
behdad
3y ago
Thanks for the brick example. I'm going to use that a lot!
36.
▲
by
behdad
3y ago
Consider the string "thereis", and the dictionary {"there", "is"}. The greedy algorithm fails.
37.
▲
by
behdad
3y ago
I expect any candidate to be hired to be able to produce code for the brute-force cases, and do the runtime analysis on them. It's a whole other debate that most software engineers, even at BigCo end up writing CSS code to move pixels
38.
▲
by
behdad
3y ago
Yes, the string equality itself is o(n).
39.
▲
by
behdad
3y ago
n is the length of the string. As for why it matters whether it's linear or quadratic, we are assessing the candidates ability to analyze a problem and possibly improve an algorithm. It might not matter in the problem at hand.
40.
▲
by
behdad
3y ago
That's the same as the trie solution.
41.
▲
by
behdad
3y ago
You are technically right. Though if we assume that the size of the dictionary is at least o(n), then the size of such DFA will be exponential in n, and indexing it will be o(n), resulting in a o(n^2) solution again, I think.
42.
▲
by
behdad
3y ago
How?
43.
▲
by
behdad
3y ago
You still need to query every byte of the input string... Any better than that you can do would be O(min(n, k)) where k is the length of the longest word in the dictionary. But without loss of generality that would be O(n).
44.
▲
by
behdad
3y ago
You are correct in that. A few points though: - While DP might be rare, memoize is quite common alternative. Sticking a @functools.cache in Python for example. They are functionally equivalent in many cases, - I believe knowing their data-s
45.
▲
by
behdad
3y ago
Thanks for the comment. By saying "I get good signal" I mean that it's not a binary yes/no, but gives a range to score the candidate. You are right about actual correlation to job performance. I know the HR at Google per
46.
▲
by
behdad
3y ago
That might have worked before ChatGPT. :)
47.
▲
by
behdad
3y ago
With the dynamic-programming you don't need the reverse trie indeed.
48.
▲
by
behdad
3y ago
Between 2010 and 2019 I interviewed dozens of Software Engineer candidates at Google. Almost always I asked the same interview question. Moreover, this question happened to be on the banned list at Google, because it was publicly available
49.
▲
On a great interview question
(behdadesfahbod.medium.com)
250 points
by
behdad
3y ago
|
456 comments
50.
▲
“Font Wars 2.0: The Untold Story”
(twitter.com)
12 points
by
behdad
6y ago
|
2 comments
51.
▲
by
behdad
6y ago
I (Behdad Esfahbod) discuss Microsoft+Adobe unfair-competition practices in the ISO Open Font Format process. 3hr video. I understand is long, but please watch if you care about my cause.
52.
▲
by
behdad
7y ago
Hey. Behdad here. I live in the States but one of our core developers is in Iran. This whole incident was a huge miscommunication on github. Fortunately they have addressed some of it. In short: Open Source and public repos are not affe
53.
▲
by
behdad
7y ago
Hey. HarfBuzz maintainer here. I live in the States but one of our core developers is in Iran. This whole incident was a huge miscommunication on github. Fortunately they have addressed some of it. In short: Open Source and public repo
54.
▲
by
behdad
10y ago
Ouch! Thanks for the report. We'll look into fixing that ASAP.
55.
▲
by
behdad
12y ago
Please continue conversation here: https://bugzilla.gnome.org/show_bug.cgi?id=321490
56.
▲
by
behdad
12y ago
Hi, Thanks for the nice words. I wrote BiCon over ten years ago and never touched it again. It definitely wasn't before SIGWINCH was introduced as I was barely four years old then :). I checked the code, looks like code for SIGWINCH
57.
▲
by
behdad
15y ago
Yes, that's what I want to do. My main goal redesigning the buffer was to 1) fix memory fragmentation, 2) make unlimited scrollback possible. I offered to find some time on a weekend to add a caching layer, a compression layer, and an enc
58.
▲
by
behdad
15y ago
No, actually it's not. That's a different issue.