Live data from Hacker News

XOR Swap - Stack Overflow for Tech Interview Questions

xorswap.com

31–40 of 42 posts

Re: XOR Swap - Stack Overflow for Tech Interview Questions

#31
post #18

Sites like this make me sad. For some reason it reminds me of an article I recently read in the New Yorker about Magnus Carlsen and his comments about how widespread use of chess software and databases is ruining human chess, because people have started to think like the computers. Too much reliance on information, less on originality. Based on my experience, A lot of tech interviews in large companies nowadays are m…

What is the 'mutable' keyword do

Do people actually ask this. I can't understand if it should be, "What the the mutable keyboard 'do'". I'm not sure of any mutable keywords by the name of "do". Or did you mean "What does the 'mutable' keyword do". Again, I'm not familiar with any popular programming languages with the keyword mutable. If they are just asking for the definition of mutability, that seems a strange question for a technical interview.

From my experience most of these interviews at these big tech companies have these kind of questions. And they suffer from having inexperienced engineers conducting the interviews. I think this is a big, untalked about problem with regard to why tech companies have such a lack of talent.

Re: XOR Swap - Stack Overflow for Tech Interview Questions

#32
This site severely needs a way to rate other people's answers or something. Even just to comment on them. Otherwise it's just silly.

Case in point: http://xorswap.com/questions/85-what-is-a-hash-table-how-wou...

No offense to ankur, but his hash function is the silliest hash function ever. It looks intelligent and reasonable and is the kind of answer I would trust if I didn't know better. But what kind of hash function is injective? If I wanted to store arbitrary doubles into his hash table I would need a zettabyte (that is a billion terabytes) of memory. Ooops. I should be able to warn people about that somehow.

Re: XOR Swap - Stack Overflow for Tech Interview Questions

#33
post #8

Earlier quoted context omitted.

It depends on the type of technical interview. If it's the sort of drivel that HR throws at coders then the less in the world the better. There are circumstances where this would be beneficial however. For my Google internship interview I searched for examples of the questions they'd ask both to put myself at ease and also to practice. I didn't go searching for questions so I could recite the answer during the interv…

Side note, but stretching before exercise increases the chance of injury. http://sportsmedicine.about.com/cs/flexibility/a/aa022102a.h...

That article is way too vague to be of any use. There are a handful of small studies that show less-than-optimal results for pre-exercise stretching when we're talking about running.

Soccer, basketball, dancing, weight lifting, rock climbing, none of these have anything to do with those results, and you should talk to people who have been doing the activity for years about how to be healthy, not about.com.

Re: XOR Swap - Stack Overflow for Tech Interview Questions

#34

I think "XOR Swap" sums up my opinion on most Tech Interview Questions. The only question I would ever ask about the XOR Swap trick would probably be "Give 3 reasons never to use this" (assuming you are in a language as least as high level as C).

Hm, I thought the reason for not using it is hardware-related (if your CPU is multi-issue, the dependencies between the three assignments kill performance). What are the language-specific reasons?

Re: XOR Swap - Stack Overflow for Tech Interview Questions

#35
post #31
post #18

Sites like this make me sad. For some reason it reminds me of an article I recently read in the New Yorker about Magnus Carlsen and his comments about how widespread use of chess software and databases is ruining human chess, because people have started to think like the computers. Too much reliance on information, less on originality. Based on my experience, A lot of tech interviews in large companies nowadays are m…

What is the 'mutable' keyword do Do people actually ask this. I can't understand if it should be, "What the the mutable keyboard 'do'". I'm not sure of any mutable keywords by the name of "do". Or did you mean "What does the 'mutable' keyword do". Again, I'm not familiar with any popular programming languages with the keyword mutable. If they are just asking for the definition of mutability, that seems a strange ques…

For the curious: mutable is a keyword in C++

See for example http://stackoverflow.com/questions/105014/c-mutable-keyword

Re: XOR Swap - Stack Overflow for Tech Interview Questions

#36

Earlier quoted context omitted.

Correlation could mean causation--perhaps you think the candidates are good as a result of their prepping.

I agree with you. If the point of "prep" for an interview is memorizing and reviewing stuff you haven't used in years, and will likely never use while you're employed at the place where you are interviewing, then it's largely meaningless. It's just cramming for an exam, instead of meaningfully understanding and using concepts. And don't get me started on "brain teasers," which don't tell you anything at all meaningfu…

Or you could just ask good interview questions that don't require knowledge of computer science trivia, like asking the candidate to write a program that plays hangman.

Of course, depending on the application computer science "trivia" could actually be part of the job requirement. E.g. if you're trying to build a scalable web service, maybe it really is important for the candidate to know when to use a heap.

I think a more or less unequivocally bad interview question is how to figure out if a linked list ever loops back using constant space. Maybe I'm just extrapolating my own stupidity, but I don't think that's the sort of thing people can reliably be expected to discover for themselves on the fly, so you'll just end up filtering out folks who haven't heard the answer to the question already.

Re: XOR Swap - Stack Overflow for Tech Interview Questions

#37
post #31
post #18

Sites like this make me sad. For some reason it reminds me of an article I recently read in the New Yorker about Magnus Carlsen and his comments about how widespread use of chess software and databases is ruining human chess, because people have started to think like the computers. Too much reliance on information, less on originality. Based on my experience, A lot of tech interviews in large companies nowadays are m…

What is the 'mutable' keyword do Do people actually ask this. I can't understand if it should be, "What the the mutable keyboard 'do'". I'm not sure of any mutable keywords by the name of "do". Or did you mean "What does the 'mutable' keyword do". Again, I'm not familiar with any popular programming languages with the keyword mutable. If they are just asking for the definition of mutability, that seems a strange ques…

Sorry for the typo, it should have said "What does the 'mutable' keyword do?"

It is interesting, sometimes when you consider two different syntactic forms of a sentence, the written form has vestiges from both.

Re: XOR Swap - Stack Overflow for Tech Interview Questions

#39
post #18

Sites like this make me sad. For some reason it reminds me of an article I recently read in the New Yorker about Magnus Carlsen and his comments about how widespread use of chess software and databases is ruining human chess, because people have started to think like the computers. Too much reliance on information, less on originality. Based on my experience, A lot of tech interviews in large companies nowadays are m…

> Too much reliance on information, less on originality.

I dunno -- if there's a giant, fairly-comprehensive question bank, and you can quickly reproduce from memory a good answer to each question, isn't it just possible you've actually learned the material?

Re: XOR Swap - Stack Overflow for Tech Interview Questions

#40

This site severely needs a way to rate other people's answers or something. Even just to comment on them. Otherwise it's just silly. Case in point: http://xorswap.com/questions/85-what-is-a-hash-table-how-wou... No offense to ankur, but his hash function is the silliest hash function ever. It looks intelligent and reasonable and is the kind of answer I would trust if I didn't know better. But what kind of hash functi…

Someone named Alex posted a good rebuttal to the hash function example. Very nice explanation of how hash tables work.
Post reply on HN