Live data from Hacker News

I failed a Twitter interview

qandwhat.apps.runkite.com

31–40 of 86 posts

Re: I failed a Twitter interview

#31

No offence to Twitter, but this is a seriously bad way of hiring developers. What are you trying to recruit mathematics scholars as developers? When will companies like Twitter learn not all great developers are math geniuses? I didn't even get a college education to get where I am, I failed maths in school as well, but I can code, so what does that mean? I think it means nothing in the greater scheme of things. By t…

What made you say that twitter is trying to recruit math genius? The author's solution involves calculus while the intended solution is only a loop and some if statements. I actually like interview problems like that. It requires critical thinking which shows how the candidates think and it is also almost impossible to google.

Re: I failed a Twitter interview

#32

> The next day I showed this question to my TA, who's a PhD student in theoretical computer science. After 40 minutes he was also stuck with nothing. That just doesn't speak well of this particular PhD. The one-pass solution is rather obvious. I hate puzzle-based interviews with passion, but this is actually a very reasonable question and it does help to tell apart people with "theoretical" computer science skills fr…

Definitely agree. As a problem, this is pretty easy. Ask anyone that does competitive algorithmic programming. The linear solution is obvious, I wouldn't say that it requires a eureka moment, even though I didn't bother thinking of the one pass because the difference would be minimal at best (for most inputs.) OP should share what his internship was about, I'd disagree if it had more to do with understanding practical implementation and development than efficency and algorithms. Both are valid skillsets equally useful to twitter.

EDIT:apologies to whoever had to kill the extra posts, my mobile hn client is on the fritz.

Re: I failed a Twitter interview

#33

> The next day I showed this question to my TA, who's a PhD student in theoretical computer science. After 40 minutes he was also stuck with nothing. That just doesn't speak well of this particular PhD. The one-pass solution is rather obvious. I hate puzzle-based interviews with passion, but this is actually a very reasonable question and it does help to tell apart people with "theoretical" computer science skills fr…

[deleted]

Re: I failed a Twitter interview

#34

Google cache: http://webcache.googleusercontent.com/search?client=ubuntu&c... It's off-line for me and asking something about installing a server.

Thanks, I'm not familiar with Kite, so when I saw it, I thought it going to give me some kind of coding test (that OP failed).

Re: I failed a Twitter interview

#35

> The next day I showed this question to my TA, who's a PhD student in theoretical computer science. After 40 minutes he was also stuck with nothing. That just doesn't speak well of this particular PhD. The one-pass solution is rather obvious. I hate puzzle-based interviews with passion, but this is actually a very reasonable question and it does help to tell apart people with "theoretical" computer science skills fr…

[deleted]

Re: I failed a Twitter interview

#36

> The next day I showed this question to my TA, who's a PhD student in theoretical computer science. After 40 minutes he was also stuck with nothing. That just doesn't speak well of this particular PhD. The one-pass solution is rather obvious. I hate puzzle-based interviews with passion, but this is actually a very reasonable question and it does help to tell apart people with "theoretical" computer science skills fr…

[deleted]

Re: I failed a Twitter interview

#37

> The next day I showed this question to my TA, who's a PhD student in theoretical computer science. After 40 minutes he was also stuck with nothing. That just doesn't speak well of this particular PhD. The one-pass solution is rather obvious. I hate puzzle-based interviews with passion, but this is actually a very reasonable question and it does help to tell apart people with "theoretical" computer science skills fr…

[deleted]

Re: I failed a Twitter interview

#38
Wait. I fail to understand why this counts as a reason for rejection. You attempted a solution, which the interviewer backed up (I assume if you were heading in a completely incorrect direction, he would have told you that), you showed quick thinking (connecting local maximas to the problem) as well as coding competence and basic testing knowledge.

Is this not what Twitter desires through its interviews?Because time and again I have heard that companies look and focus on people's thought processes more than their exact results.

PS: I'm a college student so I'm really keen to know how important being 100% accurate is.

Re: I failed a Twitter interview

#39
post #3

This question involves an "a-ha" moment (for the linear-time solution) and was thus banned from interviews at Google last year. Don't use questions involving eureka moments. They reveal nothing about the candidate. Edit: It should be noted that this question was used for a long time at Google, Microsoft, and many other places. It's a terrible question.

Is there a definition of ah-ha moment? Seems like what strikes one person as an "ah-ha" insight might be a baseline assumption of another person's thought process.

I think this explains it.

http://en.wikipedia.org/wiki/Eureka_effect

Re: I failed a Twitter interview

#40
post #25
post #21

Earlier quoted context omitted.

Your solution doesn't work when there is more than one "puddle": https://gist.github.com/alexchow/7228746 Try the case: ([2,5,1,2,3,4,7,7,6,3,5], 12)

it's not "more than one puddle"; it's that i don't count the second puddle because i don't ever "close" it by encountering it's level again. if i go off the edge, i should close it as best i can.

Ah, right. Now that I actually read your code, that's the real bug :p

The issue with this "state machine" approach is you don't have "lookahead".

In the two pass approach (approach from one side, then the other), you essentially have two machines, one implicitly serving as the "lookahead" for the other.

Post reply on HN