
Weekly Coding Interview Problems by Email - gameguy43
https://www.interviewcake.com/free-weekly-coding-interview-problem-newsletter
======
travisfischer
There is an occasional event that happens to me while on HN where I see a
title that catches my eye because it rings a certain bell in my mind. I click
through the link and as the page loads my stomach fills with butterflies as I
experience the strange sensation of finding another person has implemented an
idea of "mine", at times with frightening accuracy with regards to how I
conceived of it.

I use "mine" because obviously the idea is not mine. It's an idea I'm sure
hundreds of us of have had.

This particular site/product was one I "dreamed up" immediately after a very
disappointing interview performance. The sting of that experience made me want
to fix it for other people by giving them a clear path for being prepared for
"Google-esque" interviews. This particular implementation looks to be fairly
well executed. I signed up and hope it works out because I think it could be
useful.

What these experiences confirm for me is something we all already know. There
are really no new ideas under the sun. Or at least they are very, very rare.
Just pick a problem you know you can solve and then solve it the best way you
possibly know how and if your best is better than anyone elses best, and it's
a good idea, and the timing is right, you'll probably be successful.

On another note, I think it's interesting the creator choose the "2 egg
problem" as the example problem. I believe it is the prime example of
everything that is wrong with engineering interview culture. Not sure if that
makes it ideal material for a site like this or pointless trivia.

~~~
soham
I'm trying to see if a bootcamp angle to this works in the valley:
[http://interviewkickstart.com](http://interviewkickstart.com) .

My only revenues are from people paying to come for practice with some very
good teachers/interviewers.

I help them thru their job search afterwards, but don't take any placement
revenue from anywhere. That helps me advice the candidates (and the companies)
in a neutral, truthful way, without conflicts of interest. Candidates like
that and that's maybe one reason why my batches are going full.

I've poured myself into making this successful. Fingers crossed for the
future. All ears for suggestions and advice.

~~~
jeangenie
Interesting idea.

------
Aeolun
I think the problem with this site is that it acknowledges that interview
questions are something you can study for specifically.

Interview questions as a whole apparently have nothing to do with ability to
really code. That's just sad isn't it? Riddles are no fun if they have to be
solved under pressure.

~~~
hnriot
no not at all, these are examples of some of the things you're expected to
know as a competent engineer. being able to solve a puzzle is one thing, being
able to solve it at the optimal efficiency is a feature of the best engineers
- don't you think the people that can arrive at these solutions would be
better products? It depends on your job, but I work on big clusters on machine
learning systems and the difference between an optimal algorithm and one
that's just ok is huge.

~~~
nilkn
> these are examples of some of the things you're expected to know as a
> competent engineer

I find this statement tenuous at best when the example question has absolutely
no programming component of any kind and is entirely a little math puzzler
about determining the highest floor from which one can safely drop an egg.

It's certainly an interesting problem, and the explanation is presented
incredibly well, so I don't fault the site itself. I'm also aware that this is
something of a pop culture question for "programming" interviews. However, I
don't believe that it is in any sense true that it is necessary to excel at
this sort of question in order to be a competent programmer.

This might seem representative of the experience of trying to design a novel
algorithm to solve a new problem, but in fact it couldn't be less
representative. I've had to write some hairy code in my job a few times, and
not once was I under time pressure or expected to have the critical insight
within five minutes. Any problem that has any sort of creative or exploratory
or "research" aspect to it should not be under time pressure, and ideally it
should be mixed in with other work so that you can rest from the problem and
come back to it later. The vast majority of candidates who will pass this
particular test all the way to the end are ones who just memorized it online.

~~~
hnriot
wow, unless you got a different question that I did I am amazed at your
response. The algorithm is used often in CS, that you didn't know this kind of
makes my point. Sure you can probably work as a programmer for years and not
care about writing well optimized code, processors are so damn fast these days
you can ignore the code quality and get away with it.

Also if you couldn't reason your way to the answer how would I have any
confidence you could reason any other problem of similar difficulty level.
This kind of problem _shouldn 't_ you more than 5 or 10 minutes to figure out.

Sorry, we pass on your application :)

~~~
nilkn
That's quite a loaded and passive-aggressive non-response. It does not befit
this forum and certainly does not display the maturity I'd require from
anybody reviewing my resume. It's so filled with assumptions I don't even know
where to begin. Truly, I do not know how you deduced from my post that I don't
care about writing well-optimized code. You clearly didn't understand what I
wrote.

------
mixologic
I would walk out of a job interview that asked brain teasers. It's not
revealing of anything and tells the interviewers that either you've heard that
piece of trivia before, or you got lucky and reasoned it out. And "we just
want to see how you think" is evidence that the interviewers hadn't thought
about how to _actually_ determine what kind of an engineer you were.

The best interview I ever had was basically a small amount of spec work
accompanied by a writeup of why I did what I did.

~~~
sanderjd
It's been a long time (if ever) since I've heard anybody suggest that abstract
algorithm questions are _great_ interview questions or should be used
exclusively, but I seem to constantly hear that they are _totally useless_ and
if you ever ask such a question _you 're an idiot and I'm leaving_. It seems
to me that both perspectives are much too extreme.

~~~
frandroid
A bad interviewer is not necessarily a bad employer, anyway.

------
cpursley
Just visiting the site brings back PTS from past coding interviews. I'm
convinced that live coding interviews are a personality / public speaking
test, not a skills / knowledge test.

What's wrong with giving the candidate a take home problem then brining them
in to walk through their solution / reasoning? I've hired this way before and
worked out exceptionally well.

~~~
dmunoz
I recently had an interview which was the worst of both worlds.

I was given a take home problem under the guise that they did not do live
whiteboard coding interviews. I did the problem, and it was impressive enough
to get me on the phone. I was impressive enough to get from the phone to an
on-site.

What do you think happened at the on-site? Yup, standard whiteboard coding
interviews. Nervousness and pressure means I didn't have a very good showing,
although I did solve the problems.

Was told that very day that I wasn't going to be a good fit. Any feedback from
the interview where we finally did talk about my solution to the take home
problem would not have been taken into consideration as I was told it wasn't a
fit right after that interview and nothing was said between the two people.

I really do think that the only thing they found out about me was that I can
not do those sorts of problems while nervous and under pressure. What they
didn't find out was anything about my actual abilities.

~~~
haphazardeous
I wouldn't be that sure. Similar thing happened to me in the past. Two phone
interviews (one with HR, one with a developer). Asked to go for a face-to-face
and they asked me to do a coding exercise in an hour but what they wanted
would've taken a good few days to implement.

Anyway, my solution worked. We went through my code and discussed a few
possible performance improvements. I was also asked a few theoretical
questions which I answered confidently and was under no pressure at all.

They got back to me two days later just saying 'no'. No feed-back whatsoever.
It was because the two developer who interviewed me were the world's most
miserable developers and the moment they walked in I could tell they have no
interest in talking to me or interviewing me. Not even trying to engage in
small talk. I wasn't going to take it even if I was offered the role because I
wouldn't want to work with them. And they probably found me too friendly and
sociable and instead wanted to work with an introvert.

Bottomline is it all comes down to the chemistry. This sounds like I'm talking
about romantic relationships but it's more or less the same whenever you're
about to join a new social group. That's why all these coding exercises, in my
opinion, are just a waste of time.

------
karmacondon
Interview questions are great tests of algorithmic thinking, which is why some
companies ask them. I don't plan on interviewing for a job any time soon and I
probably wouldn't want to work at a company that asks questions like this
anyway. But I would like to get better at problem solving in general, and
interview questions seem like a great way to focus on developing a better
analytical approach.

I wonder if anyone else studies these types of problems and gains something
from it, or if they're just asked during interviews and then forgotten.

~~~
hnriot
sounds a little like cognitive dissonance there, not wanting to work for a
company that gave you a perfectly reasonable test of your algorithmic
abilities.

it's not whether you immediately forget the question/solution, it's about
reasoning your way to the solution. It doesn't matter if you forget after
because you've proven that you can get there.

------
marbemac
Typo in the first sentence..

"We collect the most popular real-world coding interview questions and
carefully craft wrteups that are ridiculously easy to understand."

wrteups = write-ups.

~~~
gameguy43
Thanks!

(I'mma wait on pushing the fix until traffic dies down a bit.)

~~~
FLUX-YOU
Coding Problem: How do you fix a typo during high traffic without breaking
production?!

~~~
jwatte
How to fix a typo during high traffic (six digit CCUs) without breaking: 1\.
svn commit 2\. Wait for all the tests to pass 3\. Run imvu_website_push

Oh, yeah, we are hiring, and don't ask the egg question during interviewing.
:-)

~~~
voltagex_
SVN? Ouch. Any plans for migration to git/hg?

~~~
jwatte
Because everyone develops on trunk, migrating a >200k commit repo isn't high
ROI. Works great for us! (Newer repos, like our real time web messaging and
our C++ WebGL game engine, are in git)

------
deadfall
I signed up to
[http://codingforinterviews.com/](http://codingforinterviews.com/) awhile back
and only got a couple problems in my inbox. Hope to have better luck with this
one.

------
porter
I took a bunch of CS classes a few years ago so I could build a software
product. Now it's built and launched with paying customers and I have a real
developer who has taken over coding. However, I've noticed that my own
programming skills have lapse. I guess if you don't use it you lose it.
Something like this might just be helpful for retaining hard won skills.
Thanks!

------
kelukelugames
i hope it's not just questions from Gayle's book and glassdoor

------
arb99
ive been a subscriber of their email newsletter for a while now. (Only noticed
emails in last few weeks though). but everytime i see one, i always open it,
one of the few engaging newsletters.

(i'm not interviewing for any position, just think its decent content and well
laid out).

------
arturnt
I get these emails weekly and it's very helpful in interview prep.

------
zamalek
Emailed you guys. I got this question: You have an array of integers, and for
each index you want to find the product of every integer except the integer at
that index.

Your answer is actually O(2n) time :). Here's O(n) time:
[https://gist.github.com/jcdickinson/8026c04dfc0d46bcce76](https://gist.github.com/jcdickinson/8026c04dfc0d46bcce76)

~~~
almost
But wait, O(2n) and O(n) are the same aren't they? Eg both linear, constant
factor doesn't make a difference to the time complexity. Or did you mean to
write O(2^n) or something?

~~~
zamalek
> But wait, O(2n) and O(n) are the same aren't they?

I guess it depends on where you work, I guess I've grown used to the more
accurate complexities we use around here and forgot about the concrete theory.
For us, twice the time is twice the time no matter how you sugar coat it.

So, uh, my bad. You are correct.

~~~
samscott
> For us, twice the time is twice the time no matter how you sugar coat it.

Which is funny, because your method still uses 2n multiplications, it just
computes them in the same loop.

~~~
zamalek
Well I look silly don't I. It microbenched it and their solution actually
faster.

If you have a golden hammer, every problem looks like a red thumb.

~~~
almost
Lots of respect for replying to a pretty snarky comment and admitting that you
were wrong with good humour, if everyone was like this internet comments would
be a whole lot better :)

~~~
samscott
Ah crap, did it come across as snarky? I'm not very good at conveying tone
through comments, it was supposed to be mildly poking fun while making a minor
nitpick.

~~~
almost
It did, at least the way I read it. That might say more about me than it does
about you though :)

