Good morning user

Good morning user,

For your interview today, you will be required to solve a familiar programming and statistics puzzle.

Given a bag of N pairs of programming socks, what's the probability that after M tries, each time removing one sock from the bag, you will have at least one pair of socks?

You have 15 minutes, please start!

Attached: programming socks .jpg (1200x800, 101.61K)

well after the 2nd sock I'll have a pair and then no matter how many more socks I pull I'll still have that first pair, giving me "at least one pair"
does that make sense?

I think user meant a left and right sock as a pair

just continue to pick out socks because you cant have enough

It's a relatively complex formula to write here, with no latex formatting

It's an imageboard, you can just upload a picture of your formula.

p = 41%

You will never be a woman.

>a left and right sock
wut

1 minus the product of 1 minus M over 2N-M+1 from 1 to M

when you do products over a range you generally need a variable, e.g. n! is the product of i from i = 1 to n, where is the variable here?

Cute feet!

THERE IS NO SUCH THING AS A LEFT OR RIGHT SOCK

you can have differently coloured pairs of socks, obviously all the pairs in the exercise have unique colour combos

replace M with x in the sum, for all x in 1...M

then the real solution is to fix your wardrobe so all your socks are the same and you don't have to waste time organizing them every time you do the laundry.

For the basic case of one pair (N = 1) and 2 tries (M = 2) this produces 1 - (1 - 1/(2 - 1 + 1)) * (1 - 2/(2 - 2 + 1)) which is 1.5 which isn't the correct answer of 1. Can you write it using some standard notation?

oops

>Can you write it using some standard notation?
no, i do webdev.

write it in javascript then

maybe tomorrow, my brain just shut down (its 5pm)

5pm? I can barely make it to 11am these days.