Live data from Hacker News

Ask HN: How to not fail on coding interview questions?

news.ycombinator.com

61–70 of 129 posts

Re: Ask HN: How to not fail on coding interview questions?

#61
In the same boat as you here.

As everyone here says, you have to practice.

Then, when you're finally fairly good at coding challenge questions, you'll discover that you also have to be good at system design questions which is a different beast altogether. And then you'll learn that instead/addition to the above, company X actually wants you to complete a take-home exercise, and company Y won't consider you because they do Python while you have Java.

It becomes very hard to know what to focus on when you don't have your eyes set on a particular company.

Re: Ask HN: How to not fail on coding interview questions?

#62
Best thing you can do is to enhance your skills in data structures and algorithms so you have a strong base in them. The interviews normally start here for most of these companies because their software deals with a large amount of data structures and/or algorithms and is essential to understand to be a productive contributor there.

If your previous work did not actually require you to know them, they probably where not building algorithms from scratch or optimizing parsing/processing of data very much. As without the essential basics of data structures and algorithms it is very hard to build scalable applications that rely on them.

As you grow in your career you will have to learn things outside of your base knowledge as you move up the ranks on the technical skills ladder. This will be standard requirements for senior level positions which you are probably seeing now. At the junior and mid level you are normally not responsible for building the core pieces of data processing software engines or massively scalable applications that run custom in house algorithms.

If you go through some of the below resources they should help fill that skills gap and make you an overall stronger engineer so you can feel confident applying for senior level positions.

I would recommend taking the following course: https://www.coursera.org/specializations/data-structures-alg... https://www.edx.org/course/algorithms-and-data-structures https://in.udacity.com/course/data-structures-and-algorithms...

and reading the following book: https://www.amazon.com/Introduction-Algorithms-Press-Thomas-...

Re: Ask HN: How to not fail on coding interview questions?

#63

>there's also extreme examples like the inventor of homebrew that got rejected by google because he couldn't reverse a binary tree. HN has rehashed this debate plenty, but I don't think you should necessarily see this as an example of a dramatic failure of the Google SWE interview process. Homebrew became a success due to great vision and execution, not because it solved a challenging technical problem. Howell seems…

Google's focus, however, is on hiring SWEs that can solve uniquely complex and difficult technical problems. I think that's kinda just marketing TBH. How else do you explain things like their habit of overhauling the graphics while removing functionality on many of their popular offerings? The last update of Google News looked a lot nicer but removed all user customization of the news feed - you can't even filter out…

>How else do you explain things like their habit of overhauling the graphics while removing functionality on many of their popular offerings?

I can't speak to any specific instances, but generally when this happens it's because the front-end needed replacing, and not because they had to give up on supporting the functionality on the backend.

For example, the front-end may have been mobile or offline hostile, while the new one works great with both but only reimplemented 80% of the massive feature set that the old UI accumulated.

It sucks if you primarily used the site on desktop and heavily leveraged the missing 20%, but I can see the value in such a trade-off.

Re: Ask HN: How to not fail on coding interview questions?

#64
I'm one of the most low-key, relaxed people you might meet, which makes my test anxiety worse: since I've learned strategies to mask my anxiety around whiteboard coding, I just look incompetent when my mind goes blank and I can't think clearly.

Contrast this to my daily work, which is often highly technical and high pressure in a wide variety of areas.

The tech interview is broken. The problem is that there aren't many good ideas to replace it. Every large company is focused on eliminating personal bias, easing the process of training new interviewers, and improving repeatability. Pass/fail-type challenges (or perhaps a simple grading system) are the easiest way to achieve those things.

Additionally, companies like Google and Facebook can absorb large numbers of junior candidates directly from schools. Most of these exams are geared toward those fresh from an academic setting.

Small companies adopt these techniques because they also want "the best" without actually considering their real needs. As a result, a cargo cult has arisen around making the technical interview increasingly long and baroque.

Here is some practical advice:

1. Talk to your doctor about your situation and tell them you've heard beta blockers[0] help stop the flight-or-fight response.

2. As others have said, practice over the course of months. Do the same problems again and again. If you can't solve these toy problems without pressure, you definitely won't solve them with pressure.

3. Ask the company ahead of time for a take-home as an alternative. Explain the situation.

Ultimately this situation won't change until engineers in decision-making positions force it to change. Interviewers also need to be trained on how to recognize test anxiety and what strategies they can employ to ease that.

[0] https://en.wikipedia.org/wiki/Beta_blocker

Re: Ask HN: How to not fail on coding interview questions?

#65
post #47

Earlier quoted context omitted.

> Howell seems like a great guy who would probably make a great senior developer, founder or PM at any company that aims to solve customer needs. Google's focus, however, is on hiring SWEs that can solve uniquely complex and difficult technical problems. Huh? Isn't all difficulty in software complexity management? Isn't writing a package manager a sufficient demonstration of that? What's a "difficult technical proble…

A difficult technical problem, for example, is Google search. It's not just managing the completely of PageRank, it involves creating fundamentally new algorithms to deliver better search results. Another way to think about it is that Google wants SWEs who can also act like researchers (e.g. PhD students).

And yet, the bulk of phd students don't reverse binary trees.

Re: Ask HN: How to not fail on coding interview questions?

#66
You have entered the world of "competitive programming". Companies have started to incorporate competitive programming problems into their interview processes. They're hard, and often don't overlap a lot with what you may do at work, but there's not much you can do about it other than to prepare.

A good book is "Competitive programmer's handbook", available for free in https://cses.fi/book.html. This book is programmer to programmer advice that will take you very very far into these kinds of problems, and gets to the point really fast. The code examples are clean and well formatted. For interviews, it gives you about 70% of the competence you would get from reading much longer books like Skiena's or Sedgewick's.

My approach to these interviews is:

- Read the requirements very well. Try to read between the lines as much as you can.

- Ask if there are follow up questions or if the exercise has multiple parts. This helps you plan your time.

- If you do not have an ideal approach, try a bruteforce approach first.

- Try to narrow down candidate solutions: what happens if I use an array? a list? a tree (binary search, trie, heap, etc)? a stack? a queue? a graph? a combination of them?

You can practice on sites like Leetcode, Hackerearth and so on so forth. If you want to try something harder, you've got this (not for the faint of heart): https://techdevguide.withgoogle.com/

But first, try to implement common data structures from scratch and get a better intuition about them. Remember to try recursive and iterative versions of operations. You can output Graphviz data and use that to debug.

Finally, even if you fail an interview, many companies will let you reapply after some period of time. I failed an interview a few years ago and I still get contacted by that same company today. It's not a life sentence.

Re: Ask HN: How to not fail on coding interview questions?

#67

Apply to companies that don't do whiteboarding/phoneboarding. I don't know, maybe this is a US thing, or the Big Four thing, but down here in London I am yet to encounter a company that does whiteboarding. https://github.com/poteto/hiring-without-whiteboards

3 out of 11 interviews I made the past month for my first job in London (mostly full stack senior developer roles, Nodejs/JavaScript) included a live pair programming or a whiteboard excersice. I failed miserably on all of these 3.

I signed for the role of Senior Product Engineer just today in a pretty fast growing startup company.

Re: Ask HN: How to not fail on coding interview questions?

#68

Apply to companies that don't do whiteboarding/phoneboarding. I don't know, maybe this is a US thing, or the Big Four thing, but down here in London I am yet to encounter a company that does whiteboarding. https://github.com/poteto/hiring-without-whiteboards

If you live near enough to a tech hub, you have to assume you're going to be code screened and whiteboarded. Companies around here (Seattle) use it as a cost cutting measure so they don't have to spend time and money manually interviewing every single candidate. It's significantly cheaper to enforce a competition-style coding challenge and pick off the top 5-10% performers (example figure) of the challenge for the actual interview.

Re: Ask HN: How to not fail on coding interview questions?

#69

It's all supply and demand. The expectations from employers as to what a 'qualified' engineer is likely to demonstrate within a 30 min to 1 hour timespan has increased. To get access to the plum jobs you have to be able to pass the gauntlet of interviews and this is something that's not particularly easy if you don't know the 'game'. First thing to realize is that you don't have to be a genius to pass these interview…

> reddit.com/r/cscareerquestions

> good advice

That place is literally college confidential for CS students. It really doesn't help anyone when the people who are giving job advice haven't even left school yet.

Re: Ask HN: How to not fail on coding interview questions?

#70

What's the pain point? The stress of being observed? Getting started? The difficulty of the problems themselves? How long would it take you to merge two sorted arrays on a computer without internet access and no one looking?

The pain point is multi faceted:

- the interview questions are invariably things that have already been solved and abstracted away.

- as an experienced programmer it's not your job to solve problems like that. The work you do is more complex and requires sleeping on it, doing research, trying stuff out, talking to people. THAT'S the stuff you're good at, and what you are hired for.

- as a result of doing that increasingly complex work you get out of touch with the simple problems, even worse you develop an instinctive internal block against doing it, you develop a 'spider-sense' for what NOT to waste your time on.

- this gets into my way when doing coding interviews.

- it also makes it harder for me to spend time practicing. I have a family, other stuff to do outside of work, do I need to spend many evenings to practice on things I will only need during coding interviews and will never need afterwards?

The process for hiring experienced engineers is completely broken.

Post reply on HN