Live data from Hacker News

$1000 coding challenge from E la Carte (YC S10)

elacarte.com

41–47 of 47 posts

Re: $1000 coding challenge from E la Carte (YC S10)

#41

Earlier quoted context omitted.

The first question needs a much larger matrix. I started writing the code, but then looked at the letters and saw the solution.

there is O(m*n) solution for problem 1.

Yeah, dynamic programming. It's a well known problem. I'm pretty sure you can just convert the matrix to 1s and 0s, and dump it into Matlab.

Re: $1000 coding challenge from E la Carte (YC S10)

#42

Earlier quoted context omitted.

there is O(m*n) solution for problem 1.

Yeah, dynamic programming. It's a well known problem. I'm pretty sure you can just convert the matrix to 1s and 0s, and dump it into Matlab.

Is it DP? I think DP is O(N^3)? That will be a funny way(Matlab) to solve this...

Re: $1000 coding challenge from E la Carte (YC S10)

#44

Earlier quoted context omitted.

there is O(m*n) solution for problem 1.

Yeah, dynamic programming. It's a well known problem. I'm pretty sure you can just convert the matrix to 1s and 0s, and dump it into Matlab.

Eh, why not just use a flood-fill type algorithm?

Re: $1000 coding challenge from E la Carte (YC S10)

#45

Earlier quoted context omitted.

Mind explaining what question 2 is actually asking? (Not the solution just the question)

1) Chef has a list of 250 3-letter codes 2) He randomly picks 5 of them as "special" 3) He makes a list X of all unique letters in the codes of these 5 dishes 4) Guest picks a random dish. There are a few things that can happen: A) The code of that dish has a letter that's not on the list X. Ignore. B) All letters of that dish are on the list X. Two options: B1) The dish the guest picked is one of the 5 special. B2)…

When you say the guest picks a random dish, does he pick a random 3 letter code, or a random one of the 250 dishes?

You want the probability that B2 happens given that B happened right? (prob(B2) / prob(B) not prob(B2) / prob (A or B))

Thanks

Re: $1000 coding challenge from E la Carte (YC S10)

#46

Earlier quoted context omitted.

1) Chef has a list of 250 3-letter codes 2) He randomly picks 5 of them as "special" 3) He makes a list X of all unique letters in the codes of these 5 dishes 4) Guest picks a random dish. There are a few things that can happen: A) The code of that dish has a letter that's not on the list X. Ignore. B) All letters of that dish are on the list X. Two options: B1) The dish the guest picked is one of the 5 special. B2)…

When you say the guest picks a random dish, does he pick a random 3 letter code, or a random one of the 250 dishes? You want the probability that B2 happens given that B happened right? (prob(B2) / prob(B) not prob(B2) / prob (A or B)) Thanks

No, guest picks one of the 250 dishes, and the probability of B2 given that either A or B happen.

Re: $1000 coding challenge from E la Carte (YC S10)

#47
post #44

Earlier quoted context omitted.

Yeah, dynamic programming. It's a well known problem. I'm pretty sure you can just convert the matrix to 1s and 0s, and dump it into Matlab.

Eh, why not just use a flood-fill type algorithm?

Wouldn't the constrained that output area should be for a rectangle cause a problem?
Post reply on HN