Live data from Hacker News

I turned my interview task for Google into a startup

uxdesign.cc

591–600 of 615 posts

Re: I turned my interview task for Google into a startup

#591
post #451

Earlier quoted context omitted.

The murder question sounds quite interesting, but I'm not sure I understand it. You have n people (initially n=13) in a circle, firing shots that are fatal with probability p (here we apparently fix p=1/6, but I guess that for large n the final answer doesn't depend on p provided it's neither 0 nor 1?), and then 1 fires at 2, then 2 (if alive) or 3 (if not) fires at 3/4, and so on. And you're person 1 (this isn't sta…

Ok, I talked to the engineer. I got it mostly right but everyone shoots to the right as soon as the lights go out. The question is "what's the probability you die?". Edit: You can also challenge people to think about the problem where everyone fires at exactly the same time OR random order since people have different reaction times. Edit 2: "The probability p(n) that a permutation of n things is a derangement -- whic…

I think I still don't understand what's happening in this scenario.

If everyone shoots simultaneously (so in particular everyone does get the chance to shoot) then I die iff the one person shooting at me hits me. Probability equals probability that a given shot hits (so in this case 1/6). No dependence at all on the number of people.

If everyone shoots sequentially, this seems just like what I described above. Probability of death is now p/(1+p) instead of p, at least if you're first to shoot and n is very large. (Unless something's very broken in the heuristic argument I gave. Let's try another. First approximation says a fraction p of people die. But that's not quite right because people who die don't get to shoot, so next approximation says we get p(1-p). Next approximation says we get p(1-p(1-p)). Etc. We can either solve the obvious equation, or else notice that we're getting more and more terms of the binomial expansion of p/(1+p).

I don't see anything here that doesn't look, in a crude approximation, like a fraction p of people dying (p, again, is probability that a given shot hits, which in this case is 1/6).

I must be misunderstanding something in the problem statement here. Perhaps it would be clearer if I'd seen the movie?

Oh, what about this version? You shoot first, things proceed cyclically, and we keep going until just one person is left. What's the chance that it's you? Naively it seems like this should be approximately 1/n no matter what p is; shooting first could confer some advantage but surely it can't be much for large n. So this can't yield anything like 1/e either. Drat.

Re: I turned my interview task for Google into a startup

#592
post #591

Earlier quoted context omitted.

Ok, I talked to the engineer. I got it mostly right but everyone shoots to the right as soon as the lights go out. The question is "what's the probability you die?". Edit: You can also challenge people to think about the problem where everyone fires at exactly the same time OR random order since people have different reaction times. Edit 2: "The probability p(n) that a permutation of n things is a derangement -- whic…

I think I still don't understand what's happening in this scenario. If everyone shoots simultaneously (so in particular everyone does get the chance to shoot) then I die iff the one person shooting at me hits me. Probability equals probability that a given shot hits (so in this case 1/6). No dependence at all on the number of people. If everyone shoots sequentially, this seems just like what I described above. Probab…

Yeah I don’t understand the question either :( I’m very interested to here the full problem and solution

Re: I turned my interview task for Google into a startup

#593
post #591

Earlier quoted context omitted.

Ok, I talked to the engineer. I got it mostly right but everyone shoots to the right as soon as the lights go out. The question is "what's the probability you die?". Edit: You can also challenge people to think about the problem where everyone fires at exactly the same time OR random order since people have different reaction times. Edit 2: "The probability p(n) that a permutation of n things is a derangement -- whic…

I think I still don't understand what's happening in this scenario. If everyone shoots simultaneously (so in particular everyone does get the chance to shoot) then I die iff the one person shooting at me hits me. Probability equals probability that a given shot hits (so in this case 1/6). No dependence at all on the number of people. If everyone shoots sequentially, this seems just like what I described above. Probab…

How about this: People shoot in a random order (now everyone has the same chance of making it to the next round. Is it 1/e?)

  import numpy as np


  class Shooter:
      def __init__(self):
          self.dead = False
          self.right = None  # The person to the right


  def simulate(n):
      # Simulates a round with n shooters
      # Returns the ratio of survivors

      shooters = [Shooter() for i in range(n)]
      for i, shooter in enumerate(shooters):
          shooter.right = shooters[(i+1) % len(shooters)]

      np.random.shuffle(shooters)

      HIT_PROBABILITY = 1/6
      survivors = n
      for shooter in shooters:
          if not shooter.dead:
              if np.random.random() 
Simulations suggest that the survival probabilities do not converge to 6/7 if you add shuffling. This makes sense, since the survival probability for the random shuffling version must be strictly less than if you are guaranteed to go first.

  >>>sum([simulate(10000) for j in range(1000)])/1000
  0.8463075999999998

Re: I turned my interview task for Google into a startup

#594
post #591

Earlier quoted context omitted.

I think I still don't understand what's happening in this scenario. If everyone shoots simultaneously (so in particular everyone does get the chance to shoot) then I die iff the one person shooting at me hits me. Probability equals probability that a given shot hits (so in this case 1/6). No dependence at all on the number of people. If everyone shoots sequentially, this seems just like what I described above. Probab…

Yeah I don’t understand the question either :( I’m very interested to here the full problem and solution

Personally, I'd like to see a careful statement of the full problem but not the solution :-).

Re: I turned my interview task for Google into a startup

#595
post #589

Earlier quoted context omitted.

Would you want to work for Saddam Hussein?

Of course not - but plenty did.

And now he's very, very, dead, earlier than he would have been naturally. On top of that, history will not remember him fondly.

Hardly a success story, in my opinion.

Re: I turned my interview task for Google into a startup

#596

Someone on my team once asked an iOS engineer to add a button to a codebase during an onsite interview. That is actually a horrible test to complete in 45 minutes if the codebase is large (and particularly hard if it’s not super well maintained because even just familiarizing yourself with the codebase can take a great deal of time). It’s one of those things that sounds easy but really, really isn’t possible to do in…

Eh, I would way prefer that. Much easier. I just refuse take home tests now.

Re: I turned my interview task for Google into a startup

#597
post #537

Earlier quoted context omitted.

I got a take home assignment from a large company a few months ago, it was the whole shebang as well. Build an iOS application with full test suite, several screens, should work with their test-api, should be polished, offline/online work etc. I estimated it to take at least 2 weeks. Sent it to a colleague and he estimated it the same. In reality you had 48 hours to turn it back in. I gave up halfway into the project…

Sometimes that's intentional. As a hiring manager I find value in seeing what someone chooses to prioritize when given an impossible task. If you have 48 hours to complete a 2 week project, what portions do you choose to complete? Can you explain why you chose that? I also don't think it's cool to do what I just said without letting the candidate know that's what is happening. Otherwise they might just get frustrated…

In my feedback they were quite clear in that I had not done everything required.

Re: I turned my interview task for Google into a startup

#598

When people are turning their interview questions into successful companies, maybe it is time to start asking some easier interview questions. This is a visceral demonstration of how absolutely ridiculous interviews have gotten.

This startup is the equivalent of a task management app. I guess you can call that a startup, and app to help you manager your exercises. There are only a 1,000 others out there.

Re: I turned my interview task for Google into a startup

#599

I love take-home assignments. Especially reasonably scoped ones. They allow me to show off my skills. However, my opinion is that it should be paid labor. Give me a day of work and pay me to do it. This values my time, it actually doesn't add all the much more to the hiring expense (all that engineer interview time, resume review time, etc is expensive!), and it makes sure you are screening out early and often and no…

> my opinion is that it should be paid labor.

Every job I've ever had required me to get advance permission to do paid outside work, so such a rule would eliminate most people who are both ethical and employed.

Re: I turned my interview task for Google into a startup

#600

Earlier quoted context omitted.

Many people prefer this to an in-person whiteboard challenge. It's lower stress, and doesn't require taking additional time off from your current employer. A 2-4 hour challenge is less time than I've spent in interviews at some companies, and would gladly have done it prior to an in-person interview given the option. That way, the actual interview time could have been spent talking about things of value, rather than…

Every "take home" challenge I've ever been presented with happens before the onsite interview and doesn't replace it.

Right. Some companies use it as a screen, we used it to inform the interview.

Two of the last three companies I interviewed at had at least 4 hours of in-person interviews. One of those (for a regular developer position, around 7 years ago) had multiple whiteboard sessions with different people. The problems were trivial to solve if you had access to google or had memorized basic data structures and related algorithms. Instead of taking half an hour or an hour talking about the code I'd written to solve a problem representative of what the actual job entailed, we spent 4x as much time (during business hours) talking about things freshmen learn in CS programs (I'm assuming here, I didn't get a CS degree).

Even if the total amount of time is the same, or even greater, I still prefer the take-home assignment because I can do it on my own time, rather than taking off of work, and - if done correctly - makes for a much interview.

As a candidate, you learn far more about the people you're going to be working with than in a whiteboard session as well.

Post reply on HN