| New Reply |
Interview questions |
Share Thread | Thread Tools |
| Feb16-12, 08:50 PM | #18 |
|
|
Interview questions |
| Feb16-12, 09:54 PM | #19 |
|
|
Does #9 have a solution?
|
| Feb17-12, 05:34 AM | #20 |
|
|
These are typical google/facebook interviews.
I was successfully able to answer question #6 in one of my interviews. go left; go left; go right; set marker; }; while(!peerFound) { go left; } if (c == NULL || c == 'space') { while (!stackEmpty)) { print(pop(stack)); } } if (c == NULL) { break; } else { push(stack, c); } } |
| Feb17-12, 06:36 AM | #21 |
|
|
Yeah, these I found trivial. I didn't bother about them. And I didn't bother about #1 though I don't know the answer by heart.
I don't believe you got the right answers though. The #6 should be something like 'forall n: do n steps left, retreat, do n steps right, retreat' But the question is underspecified, you need to know that the robots take alternate turns. The #7 is easy too. Should be something like: 'split on space, reverse the words, concatenate the result.' You didn't do anything that resembles that. |
| Feb17-12, 06:58 AM | #22 |
|
|
The logic is, Move slow (left,left, right) in one direction until you find a marker set. And while moving, set the marker. Once you find the marker set (that means, the other robot has visited this spot), move faster (continuous left), so you would eventually meet the other robot that is moving slower (left, left, right). |
| Feb17-12, 07:12 AM | #23 |
|
|
I could do four of them for sure, and I could take a pretty good stab at about another three of them. Only having a minute each would be trouble, because I don't always think that quickly.
|
| Feb17-12, 07:37 AM | #24 |
|
|
Oh, I understood that both robots drop a marker where they are dropped. My answer would work too. Now I look at it more closely, hmm, I guess you can't do something n times, so you're answer is better.
Hmm, I'll look at it again. |
| Feb17-12, 07:38 AM | #25 |
|
|
|
| Feb17-12, 08:42 AM | #26 |
|
|
Ah, I was afk for a moment. The trivial answer is 'walk left until you hit a marker, then double your speed.' Which is your answer. ;-) Ah well.
|
| Feb17-12, 11:44 AM | #27 |
|
|
I am still annoyed about #9. I have the feeling it can't have a solution, but I am not sure why or how to prove it. Anyone?
|
| Feb17-12, 02:51 PM | #28 |
|
Mentor
Blog Entries: 4
|
|
| Feb17-12, 05:49 PM | #29 |
|
|
#2 from Jimmy I think is wrong. The expected value, I guessed, is: chance you get to the 1st throw * expected return on the 1st throw + chance you get to the 2nd throw * expected return on the 2nd throw + ... = 1.0 * 3.5 + 0.5 * 3.5 + 0.25 * 3.5 + ... = 7.
(Difference is that I read the question as if you get a return on each throw.) (Hmm, I guess it's Jimmies interpretation? Which means 3.5 since it doesn't make sense to role a dice again if you got a better result than the expectancy?) |
| Feb17-12, 05:51 PM | #30 |
|
|
#10 from Jimmy is wrong I think. Spin the barrel for a 1/3 chance of dying, and pull the trigger for a 1/4 chance of dying. So you pull the trigger.
|
| Feb17-12, 06:03 PM | #31 |
|
|
#12 I read as a reference to Black-Scholes.
|
| Feb17-12, 06:09 PM | #32 |
|
|
#11 I don't know either. You don't know if it's call or put, you don't know the spot price. If it's call, the lowest strike price is probably the best. Look here, monetary value.
|
| Feb17-12, 06:34 PM | #33 |
|
|
1 2 3 4 + + The numbers are the blank spaces, the +s are bullets. If you pulled the trigger on 1, you're safe to pull again. If you pulled the trigger on 2, you're safe. If you pulled the trigger on 3, you're safe. If you pulled the trigger on 4, you're dead. That's 1 in 4. |
| Feb17-12, 07:21 PM | #34 |
|
|
I am probably the only one who reads #9 as: an algorithm such that you end up either with exactly 200 or 0 in the end. Right?
|
| New Reply |
| Thread Tools | |
Similar Threads for: Interview questions
|
||||
| Thread | Forum | Replies | ||
| Interview questions from hell | Fun, Photos & Games | 6 | ||
| Questions For Interview (Project) | Engineering, Comp Sci, & Technology Homework | 1 | ||
| Interview Questions | Mechanical Engineering | 3 | ||
| Physics interview questions | Academic Guidance | 1 | ||