Technical Interviews

  1. Palindrome: I’d split a string into an array and compare the first and last character, and from that point on to the center. If they want to ignore apostrophes and such, I’d transform it to lowercase and filter out only letters from a to z. In the middle of the word you’re either left with 1 letter or 2, if it’s 1 letter it doesn’t need to match up with anything, otherwise the same logic applies. But honestly, I’d probably Google it and find a solution on stack overflow with hundreds of up-votes and be done with it in minutes rather than half an hour or so;
  2. Elevators: You either know or update data for timers so you know how long an elevator takes to get somewhere. You simply request the one that has the lowest time-to-destination timer. An empty elevator on the same floor has 0 (zero), an empty one on the floor above you has (start up time + travel time + opening time) = 20, and one in motion from 5 to 7 has a timer running for 15 seconds, and includes a time-to-yourself timer of 35 seconds. Pick the quickest one. And first Google it because it’s likely that someone has a solution for this kind of problem online already;
  3. Reverse a list? I don’t know. Reverse the array in javascript, I’d say. I’d just quickly Google that problem just to find any caveats others might have found that I’m not aware of;
  4. Dropbox backup? Talk to your sysop for backup solutions, I’m not one. If you insist I start doing it, I’ll need to research backup methodologies, Dropbox, its limitations, etc. I’d Google it, first;
  5. Passionate? Dude, you’re the 4th company I’m interviewing with today and I have offers from 3 of them already, last I checked. I’m not passionate about this company in the slightest: I don’t even know this company. You’re here to prove you’re worth my time.
/r/webdev Thread