Earlier quoted context omitted.
That works if each phrase is one word. Many (most?) of the terms in the vocabulary are multi-word phrases. How would your algorithm work for multiple word phrases? What is its running time?
It would have to be altered; let's see: Create hashtable where the key is the first word and the value is (rest of sentence, link). In the case of collisions, a list of rest of sentences and links. Checking the document would still go word by word, if no lookup fine, if one result compare the rest of phrase with the following document words, if a list, do that repeatedly. Runtime varies a lot with distribution of inp…
Don't write on the whiteboard
111–118 of 118 posts
Re: Don't write on the whiteboard
#112Earlier quoted context omitted.
It would have to be altered; let's see: Create hashtable where the key is the first word and the value is (rest of sentence, link). In the case of collisions, a list of rest of sentences and links. Checking the document would still go word by word, if no lookup fine, if one result compare the rest of phrase with the following document words, if a list, do that repeatedly. Runtime varies a lot with distribution of inp…
In the case of collisions, you need to search for a bunch of possible rest-of-sentence phrases in the text. This is exactly the problem that your algorithm tries to solve! If you apply it recursively, you get, essentially, trie matching with words instead of characters. http://en.wikipedia.org/wiki/Trie
Instead of:
For phrase in keyphrases:
If phrase in document:
pass
This For word in document:
Some_phrases = get_keyphrases_starting[word]
if document.next_5_words.find(some_phrases)
Instead of searching 100,000 keyphrases in the whole document, this searches 10 rest-of-sentences in the 5 words following a mention of 'phospholipid', 18 rest-of-sentences in the 3 word following 'proteomerase' and nothing in the text about the lab temperature, and never touches most of the keyphrases at all for the document.Re: Don't write on the whiteboard
#113Earlier quoted context omitted.
Parents of children and teachers don't seem to have a problem with paper.
I don't have a problem with paper - I just feel like it would work against a candidate - not because "Oh...they used paper", but because some of the things that I think are signs of a good candidate don't show through. I've never interviewed a candidate that asked me to use paper, so I can't be sure - it's just my instinct. It might be completely biased though - I far prefer to use whiteboards - I love the space, I l…
Re: Don't write on the whiteboard
#114Sorry OP, I realize that you're just trying to be helpful sharing what's worked for you and I appreciate that, but frankly, I hate posts like this... I think the best preparation for any interview is to simply get good at what you do. All the rest is window dressing that distracts from that goal. Every minute spent practicing interviewing would be better spent building stuff. The natural byproduct of this will be exe…
Simplicity is the ultimate sophistication.-- Leonardo Da Vinci
Re: Don't write on the whiteboard
#115Sorry OP, I realize that you're just trying to be helpful sharing what's worked for you and I appreciate that, but frankly, I hate posts like this... I think the best preparation for any interview is to simply get good at what you do. All the rest is window dressing that distracts from that goal. Every minute spent practicing interviewing would be better spent building stuff. The natural byproduct of this will be exe…
> I think the best preparation for any interview is to
> simply get good at what you do
Isn't that exactly the problem? How often are you asked to do the stuff you do best in the interview?
Coding algorithms on the whiteboard is not what I do best.Re: Don't write on the whiteboard
#116The interviewers don't care. Use paper. Uh, yeah, we do care. Part of what we're judging is your ability to present and explain your work. How you do your work is your business, but how you share it affects the people you work with. If you think it's all about you, then you're off on the wrong foot already.
Re: Don't write on the whiteboard
#117Earlier quoted context omitted.
As an interviewer, I'd much rather see your intermediate steps - the messy parts, etc. I feel like I can get a better idea about how you work and think. Interview questions (for me) aren't about "can you solve this" they're more about trying to see how you work. I ask questions about decisions you made, and I like it if you can talk about what you're thinking. Interview problems are contrived. I don't care if you stu…
That sounds more like a visit with Froyd than a programmer interview.
Re: Don't write on the whiteboard
#118Since you will presumably be writing code on a computer when working at the company, why not write code on a computer when interviewing with one?