6 ms·
$1000 coding challenge from E la Carte (YC S10)
E la Carte (www.elacarte.com ) is a startup out of MIT that deploys tablets on restaurant tables so that guests can order food, play games and pay for their meals without waiting.
Test your skills at http://www.elacarte.com/challenge and win $1000
Rules: Winner gets $1000. Next 5 top-ranked applicants get $100 each
Time and quality of submitted code are both factored into rankings.
- ryanfitz 15y agoThe title might be a bit misleading, I thought this was going to be something where I could hook into your api and I could build something fun. Instead it seems to be more of an interview questions style challenge.
- VernatKhisamov 15y agoeasy money will be mine :)
- alFoX 15y agogreat startup!
- ColinWright 15y agoClickable: http://www.elacarte.com/challenge http://www.elacarte.com/challenge
- blhack 15y agoI'm kindof confused: do you want us to write actual code? Just give an explanation of how to do this? If the former: what language, what assumptions can we make about the environment?
- rajatsuri 15y agofor q1 - submit an answer and explain how you got there (with whatever code you wrote, if any) for q2 - just the answers are sufficient for q3 - submit an explanation of how you'd tackle the problem, or code
- deleted 15y ago[deleted]
- deleted 15y ago[deleted]
- Ben_Dean 15y agothe first question seems a tad ambiguous to me. Is a contiguous rectangular block a rectangle s.t. all restaurants == P, or is it rectangle in which every P has at least one immediate neighbor == P?
- anonymoushn 15y agoIt is a rectangle containing only P.
- deleted 15y ago[deleted]
- trickjarrett 15y agoWill you be posting the answers after this concludes? I solved #1 but am afraid I won't get #2.
- anonymoushn 15y agoFor #2, are the codes unique? Do customers select dishes uniformly at random, without regard to whether they appear to be available? How could an item possibly appear to be unavailable when in fact it is available? The problem statement makes it seem that the grid presented to the customer is an array of 36 squares, where every square that corresponds to a letter or number that occurs in any index of any possible special (whether it is the special today or not) has been crossed out. How is the customer to deduce anything from this that he or she could not already deduce from the published list of possible specials?
- alexis-d 15y agoI agree, the wording of the second problem is very unclear for me, in particular how the grid works...
- anonymoushn 15y agoI tried solving the version of the problem in which codes are not necessarily unique, the grid an array of 36 squares in which each letter/number contained in any of today's specials has been crossed out, an item "appears" to be available iff all of its letters/numbers have been crossed out, and the customer picks one of the 250 items uniformly at random. It seems that this is not the correct interpretation of the problem statement.
- rajatsuri 15y agothe first part of q2 assumes that the customer has already picked items that appear to be available
- anonymoushn 15y agoI tried solving the version the problem in which the codes are not necessarily unique, the grid is 1x36, only any character that appears in the code of any item that is a special today is marked, an item "appears to be available" iff all of the characters in its code are marked, and the customer chooses from the items that appear to be available for the first question. It seems that this is not the correct interpretation of the problem statement.
- georgemcbay 15y agoDon't factor time into the rankings unless you mean overall time from start of the challenge until 3 valid answers are entered (and even that is broken since it favors people who have heard about the challenge sooner). There's nothing stopping anyone who really cares from getting the entire challenge ahead of time and then doing their pre-worked-out for-reals answer entries from a new IP address.
- rajatsuri 15y agonot to worry, we're aware of how people might try to cheat... it's not fully automated, we have our engineers judging this as well
- mathgladiator 15y agome thinks you are solving the wrong problem
- oleg_kikin 15y agoI answered all questions correctly. At the end they ask you for your name and your email. > We have received your submission and will be responding shortly
- rajatsuri 15y agonice work!
- oleg_kikin 15y agoThe first question needs a much larger matrix. I started writing the code, but then looked at the letters and saw the solution.
- rohananil 15y agothere is O(m*n) solution for problem 1.
- oleg_kikin 15y agoYeah, 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.
- thedufer 15y agoThe second problem is not well-defined, so how long it takes has considerably more to do with how many possible interpretations you have to try before you get it right and how long it takes you to grok the grid scheme than how long it actually takes you to solve problems of that nature. You may want to consider rewriting it. As it is, I've lost any interest I initially had in your company as a whole. You need to stand out to applicants as much as they need to stand out to you, and this is doing exactly the opposite.
- o1iver 15y agoPlease elaborate... I don't understand the criticism. I find the question quite interesting. What is ambiguous about it?
- thedufer 15y agoIt does not state whether all 250 items must have unique codes. It also is not clear whether, in the questions, the guest chooses a random code (unlikely), a known item, or an item that is marked as being on the menu. The second question is very misleading, because the answer is obvious without any math at all, which led me to believe I had misinterpreted the problem completely. Finally, when you call something a grid, I expect it to be 2-dimensional, and without a picture this is the image that stuck. It took me longer than it should have just to grok this basic premise of the problem. Addendum: it is also not clear whether the five items must be five distinct items, i.e. drawing with vs. without replacement. On a related note, pages with no title and no favicon give a feeling of illegitimacy. This also added to my overall poor impression of this startup.
- deleted 15y ago[deleted]
- mherdeg 15y ago#2 has me puzzled. The problem statement (paragraphed): Chef Claudio loves to have food specials but likes knowing what each day's specials are to be a challenge. So, he assigns a random 3-digit alphanumeric code to each of the 250 items he might make and publishes this list. [1] [2] [3] Each day, he chooses a set of five items to make and uses a grid with a square for each of the 36 letters/numbers to let guests know if a particular item they want is a special that day. [4] To do this, for each of the digits of each item, he crosses out that square on the grid (if the square is already crossed out, he makes no change). [5] What is the probability (to the ten-thousandths place) that a guest chooses an item and the grid makes it appear to be today's special when in fact it is not? [6] [7] What is the probability (to the ten-thousandths place) that a guest chooses an item and the grid makes it appear to be unavailable as today's special when in fact it is available? [8] --------------------------------------------------------------- [1] There's a list of 250 items. [2] Each item has a "code" consisting of three alphanumeric characters. Each character was randomly chosen -- so "AA0" is a possible item name. [3] No two items have the same code. (NB: This is not explicitly stated and does affect the outcome.) [4] Five randomly chosen items are "specials" today. [5] Everyone can see "today's codes": a list of all the characters that are in at least one "special". So for example if the specials are "AA1", "AA2", "AA3", "AA4", and "AA5", everyone can see that "today's codes" are the characters "A12345". [6] We say an item "appears to be a special" if all the characters in its code are in "today's codes". [7] We want to know: What is the probability that, if I pick an item from the list which appears to be a special, it actually is not a special? A quick & dirty Monte Carlo simulation proceeds as follows: [A] This is how to generate the probability that this happens in a single trial. (1) Store a list of 250 distinct three-character alphanumeric strings, chosen from the alphabet 0...9A...Z. This is "the list". (2) Randomly choose five items from "the list". Record the five items as "today's specials". For each letter in each item, record the fact that "this letter is one of today's codes." (3) Compute the denominator: how many items on "the list" contain today's codes. (4) Compute the numerator: how many items on "the list" contain today's codes and are not one of "today's specials". (5) Return the numerator divided by the denominator as the probability, in this trial, that you picked an apparent special which was not actually a special. [B] Perform [A] a lot of times and average the probability returned in each trial. This is not amenable to a quick Monte Carlo simulation. But after 100k trials it does seem to stabilize into one approximate region. The actual answer that the system apparently wants (via brute force & curl) I do not understand at all. Seems like it's off by an order of magnitude. I must have messed up an assumption. --------------------------------------------------------------- [8] This never happens - it's zero.
- swanson 15y agoI thought I had a pretty nice hack to solve #1 - I opened the matrix in a new tab of the browser, used Ctrl+F to see for 'P'. This highlighted all the P's with a different color and then just visually found the biggest looking rectangle. Took about 45 seconds :P
- Joshim5 15y agoHow many problems are there? The first one is quite simple, and I'd like to know how long I'll need to complicate the entire challenge before I begin.