expect around 3 brainteasers, maybe a fermi question, some market talk, have questions ready. only thing that matters is how well you solve the brainteasers . . .
What is the angle between the hour-hand and minute-hand of a clock at 3:15?
You are given a 3-gallon jug and a 5-gallon jug. How do you use them to get 4 gallons of liquid?
Four investment bankers need to cross a bridge at night to get to a meeting. They have only one flashlight and 17 minutes to get there. The bridge must be crossed with the flashlight and can only support two bankers at a time. The Analyst can cross in 1 minute, the Associate can cross in 2 minutes, the VP can cross in 5 minutes and the MD takes 10 minutes to cross. How can they all make it to the meeting in time?
Three envelopes are presented in front of you by an interviewer. One contains a job offer, the other two contain rejection letters. You pick one of the envelopes. The interviewer then shows you the contents of one of the other envelopes, which is a rejection letter. The interviewer now gives you the opportunity to switch envelope choices. Should you switch?
I have seen all of those before, so for me, it really wouldn't be fair. The last one is specifically a re-wording of the Monty Python problem (which was fun to prove in college). However, I do like these kind of questions, so if anyone has any more, feel free to share. I'll try to think of others as well (maybe in a new post).
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
That "Monty Python" (it was really Monty Hall, not the character) problem might not be so obvious since the problem didn't specifically say that the interviewer chose a rejection letter, just that it turned out that way. Unless the interviewer intentionally chose the rejection letter, both remaining pieces would be equally likely to be an acceptance letter. That is, 50%
That "Monty Python" (it was really Monty Hall, not the character) problem might not be so obvious since the problem didn't specifically say that the interviewer chose a rejection letter, just that it turned out that way. Unless the interviewer intentionally chose the rejection letter, both remaining pieces would be equally likely to be an acceptance letter. That is, 50%
Or it could just be me over thinking it.
LOL dumbest thing I have ever heard... the obv answer is that you always switch in the end... that's it... very simple...
they generally have 3-4 rounds. i assume 1st round was on teh phone. 2nd round will also likely be on the phone. at my experience they asked you a question and then asked you how confident you were in your answer, so if you were 40% confident the interviewer would make a market on your answer (he has already heard it). so he will ask if you want to get a 3 : 1 return if you are willing to bet X number of poker chips. you keep betting until you lose everything or win everything. questions are significantly more difficult but not unlike those in heard on the st
Detailed In-Person Jane Street Interview: 1st and 2nd phone interviews (Originally Posted: 10/28/2010)
Two phone interviews about a week apart. I was then invited to their offices in NYC. The questions involved advanced functional programming techniqiues such as continuous passing style (CPS), lazy evaluation, memoization, and futures.
1st phone interview:
Three bags: Oranges, Apples, Mixed. All mislabeled.
Compute a random permutation so that each permutation is equally probable.
Test the randomness of a black box that outputs random 64-bit floats.
2nd phone interview:
Give the type of a binary tree and an algorithm to compute its depth:
type 'a tree = Leaf | Node of 'a * 'a tree * 'a tree
let depth = function
| Leaf -> 0
| Node (_, left, right) -> 1 + max (depth left) (depth right)
Make it tail recursive (not told to use CPS):
let depth n =
let rec loop n k =
match n with
| Leaf -> k 0
| Node (_, left, right) ->
loop left (fun v1 -> loop right (fun v2 -> k (1 + max v1 v2)))
in
loop n (fun x -> x)
1st in-person interview:
Given the signature:
val lazy : (unit -> 'a) -> (unit -> 'a)
Implement 'lazy' that takes a function f and returns a function g such that f is only called if g is called, and f is only called at most once. g will always return the same result as if f was called. Non-obvious caveats are: the function f might raise an exception, or the use of the function g may be within a concurrent system.
type 'a lazy_option = None_lazy | Some_lazy 'a | Exn_lazy exn
let lazy f =
let res = ref None_lazy in
let lock = Mutex.create () in
(fun () ->
(* Try a non-blocking look up first )
match !res with
| Some_lazy v -> v
| Exn_lazy e -> raise e
| None_lazy ->
( Obtain the lock and make sure it is really None_lazy *)
Mutex.lock lock;
match !res with
| Some_lazy v -> Mutex.unlock lock; v
| Exn_lazy e -> Mutex.unlock lock; raise e
| None_lazy ->
try
let v = f () in
res := Some_lazy v;
Mutex.unlock lock;
v
with
e ->
res := Exn_lazy e;
Mutex.unlock lock;
raise e
)
2nd in-person interview (right after 1st):
Given the signature to a regular expression parser (perl style), give the implementation. The function 'match' should return the first match of an expression within a string and a new function 'more' that you can use to successively iterate all possible matches. You have 45 minutes to write this on a white board.
Keys: Once you are able to match a range of characters (e.g. A-Z), use this over and over. Decide early on whether * and + are greedy or non-greedy.
3rd in-person interview:
You are given a module with the following signature:
type 'a ivar
type 'a deferred
val create : unit -> 'a ivar * 'a deferred
val upon : 'a deferred -> ('a -> unit) -> unit
val fill : 'a ivar -> 'a -> unit
val read_file : string -> string deferred
I was left guessing what this module does. Ask questions to clarify! This represents the future value of some computation. Use 'upon' to register a function to be invoked with the value written to the ivar at a future time. Some process will invoke 'fill' on an ivar to set its value once its computation is finished. Given this module (it is a black box), write the following function:
val file_size : string -> int deferred
An example usage is the following:
upon (file_size "some_file") print_int
One implementation of 'file_size' may look like:
let file_size name =
let i, d = create () in
upon (read_file name) (fun s -> fill i (String.length s));
d
Generalize this to use any function that returns 'a deferred. This was horribly ill-defined and left even my two interviewers disagreeing as to what was desired. The desired solution mapped an 'a deferred to a 'b deferred:
val map_deferred : 'a deferred -> ('a -> 'b) -> 'b deferred
let map_deferred x f =
let i, d = create () in
upon x (fun v -> fill i (f v));
d
I got the impression that the interview process was going well until the last question. I was told the firm decided not to offer me a position, without any explanation. Reading other scenarios, Jane Street has either set the bar unattainably high, or you have to be part of the "boy's club" to get in.
On another note, the work environment is a crowded open space with people constantly yelling to each other. They advertise a 50 hour work week with no lunch break. My impression is that your base salary is just over $100k, without any indication of bonuses for software engineers. Given their skill requirements and the number of hours required, the compensation does not seem adequate (especially for NYC). You can earn more and be treated better elsewhere.
Maxime nulla expedita sunt. Corrupti autem minima dicta et et. Qui reiciendis aut magni sed aut deleniti.
Quos magnam neque non doloremque maiores odio ut id. Dignissimos accusamus porro omnis accusamus at qui. Minus quibusdam explicabo aut qui quae placeat placeat. Itaque sit vero voluptates quis nobis labore.
Corporis architecto labore cum mollitia quis porro. In commodi deserunt sed dolorum ut est. Qui rerum consequatur praesentium quia quasi sint. Quia nisi repellendus corrupti. Hic minima fugit eos nobis. Alias non temporibus eius dolores quas mollitia possimus.
Eius omnis nemo aut consequatur non velit. Et perspiciatis maiores consequatur enim dolore. Adipisci sint sint et veniam rem iure et. Tempore pariatur sunt necessitatibus alias suscipit aut.
See All Comments - 100% Free
WSO depends on everyone being able to pitch in when they know something. Unlock with your email and get bonus: 6 financial modeling lessons free ($199 value)
Sorry, you need to login or sign up in order to vote. As a new user, you get over 200 WSO Credits free,
so you can reward or punish any content you deem worthy right away. See you on the other side!
lots of brainteasers
expect around 3 brainteasers, maybe a fermi question, some market talk, have questions ready. only thing that matters is how well you solve the brainteasers . . .
What are the proofs they ask? What do you mean by questions on distributions? I have a second round interview with jane street.
Anyone have a couple of good examples of brainteasers? I'm not interviewing with them, I'm just curious.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
or in general? here are a few traditional ones:
What is the angle between the hour-hand and minute-hand of a clock at 3:15?
You are given a 3-gallon jug and a 5-gallon jug. How do you use them to get 4 gallons of liquid?
Four investment bankers need to cross a bridge at night to get to a meeting. They have only one flashlight and 17 minutes to get there. The bridge must be crossed with the flashlight and can only support two bankers at a time. The Analyst can cross in 1 minute, the Associate can cross in 2 minutes, the VP can cross in 5 minutes and the MD takes 10 minutes to cross. How can they all make it to the meeting in time?
Three envelopes are presented in front of you by an interviewer. One contains a job offer, the other two contain rejection letters. You pick one of the envelopes. The interviewer then shows you the contents of one of the other envelopes, which is a rejection letter. The interviewer now gives you the opportunity to switch envelope choices. Should you switch?
you can obviously google or search to find more
ditto. Lots of probability
I have seen all of those before, so for me, it really wouldn't be fair. The last one is specifically a re-wording of the Monty Python problem (which was fun to prove in college). However, I do like these kind of questions, so if anyone has any more, feel free to share. I'll try to think of others as well (maybe in a new post).
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
That "Monty Python" (it was really Monty Hall, not the character) problem might not be so obvious since the problem didn't specifically say that the interviewer chose a rejection letter, just that it turned out that way. Unless the interviewer intentionally chose the rejection letter, both remaining pieces would be equally likely to be an acceptance letter. That is, 50%
Or it could just be me over thinking it.
LOL dumbest thing I have ever heard... the obv answer is that you always switch in the end... that's it... very simple...
Jane Street 2nd Round (Originally Posted: 10/17/2010)
How bad is the slaughtering going to be, and what methods will they be using (ie fingernail pulling, electric shock, etc.) ?
do a search; they have 5 rounds or something
yea i know, just tryin to get some specifics .. plus a lot of the other strings are outdated (like from 2008)
astroglide sphincter and bravely charge drawn bayonets
they generally have 3-4 rounds. i assume 1st round was on teh phone. 2nd round will also likely be on the phone. at my experience they asked you a question and then asked you how confident you were in your answer, so if you were 40% confident the interviewer would make a market on your answer (he has already heard it). so he will ask if you want to get a 3 : 1 return if you are willing to bet X number of poker chips. you keep betting until you lose everything or win everything. questions are significantly more difficult but not unlike those in heard on the st
Detailed In-Person Jane Street Interview: 1st and 2nd phone interviews (Originally Posted: 10/28/2010)
Two phone interviews about a week apart. I was then invited to their offices in NYC. The questions involved advanced functional programming techniqiues such as continuous passing style (CPS), lazy evaluation, memoization, and futures.
Test the randomness of a black box that outputs random 64-bit floats.
2nd phone interview:
type 'a tree = Leaf | Node of 'a * 'a tree * 'a tree
let depth = function | Leaf -> 0 | Node (_, left, right) -> 1 + max (depth left) (depth right)
let depth n = let rec loop n k = match n with | Leaf -> k 0 | Node (_, left, right) -> loop left (fun v1 -> loop right (fun v2 -> k (1 + max v1 v2))) in loop n (fun x -> x)
Implement 'lazy' that takes a function f and returns a function g such that f is only called if g is called, and f is only called at most once. g will always return the same result as if f was called. Non-obvious caveats are: the function f might raise an exception, or the use of the function g may be within a concurrent system.
type 'a lazy_option = None_lazy | Some_lazy 'a | Exn_lazy exn
let lazy f = let res = ref None_lazy in let lock = Mutex.create () in (fun () -> (* Try a non-blocking look up first ) match !res with | Some_lazy v -> v | Exn_lazy e -> raise e | None_lazy -> ( Obtain the lock and make sure it is really None_lazy *) Mutex.lock lock; match !res with | Some_lazy v -> Mutex.unlock lock; v | Exn_lazy e -> Mutex.unlock lock; raise e | None_lazy -> try let v = f () in res := Some_lazy v; Mutex.unlock lock; v with e -> res := Exn_lazy e; Mutex.unlock lock; raise e )
Keys: Once you are able to match a range of characters (e.g. A-Z), use this over and over. Decide early on whether * and + are greedy or non-greedy.
type 'a ivar type 'a deferred
val create : unit -> 'a ivar * 'a deferred val upon : 'a deferred -> ('a -> unit) -> unit val fill : 'a ivar -> 'a -> unit
val read_file : string -> string deferred
val file_size : string -> int deferred
An example usage is the following: upon (file_size "some_file") print_int
One implementation of 'file_size' may look like: let file_size name = let i, d = create () in upon (read_file name) (fun s -> fill i (String.length s)); d
Generalize this to use any function that returns 'a deferred. This was horribly ill-defined and left even my two interviewers disagreeing as to what was desired. The desired solution mapped an 'a deferred to a 'b deferred:
val map_deferred : 'a deferred -> ('a -> 'b) -> 'b deferred
let map_deferred x f = let i, d = create () in upon x (fun v -> fill i (f v)); d
I got the impression that the interview process was going well until the last question. I was told the firm decided not to offer me a position, without any explanation. Reading other scenarios, Jane Street has either set the bar unattainably high, or you have to be part of the "boy's club" to get in.
On another note, the work environment is a crowded open space with people constantly yelling to each other. They advertise a 50 hour work week with no lunch break. My impression is that your base salary is just over $100k, without any indication of bonuses for software engineers. Given their skill requirements and the number of hours required, the compensation does not seem adequate (especially for NYC). You can earn more and be treated better elsewhere.
I agree.
Jane Street second round (Originally Posted: 01/24/2008)
How much worse than the first?
never got to the second round :( congrats and good luck
Maxime nulla expedita sunt. Corrupti autem minima dicta et et. Qui reiciendis aut magni sed aut deleniti.
Quos magnam neque non doloremque maiores odio ut id. Dignissimos accusamus porro omnis accusamus at qui. Minus quibusdam explicabo aut qui quae placeat placeat. Itaque sit vero voluptates quis nobis labore.
Corporis architecto labore cum mollitia quis porro. In commodi deserunt sed dolorum ut est. Qui rerum consequatur praesentium quia quasi sint. Quia nisi repellendus corrupti. Hic minima fugit eos nobis. Alias non temporibus eius dolores quas mollitia possimus.
Eius omnis nemo aut consequatur non velit. Et perspiciatis maiores consequatur enim dolore. Adipisci sint sint et veniam rem iure et. Tempore pariatur sunt necessitatibus alias suscipit aut.
See All Comments - 100% Free
WSO depends on everyone being able to pitch in when they know something. Unlock with your email and get bonus: 6 financial modeling lessons free ($199 value)
or Unlock with your social account...