Coding Interview Problems with Detailed Solutions, Test Cases, Program Analysis
hoanhan101.github.io
hoanhan101.github.io
Here's the project: https://github.com/brndnmtthws/cracking-the-coding-interview...
https://scilogs.spektrum.de/hlf/mental-cryptography-and-good...
Students learn to game the system to get a high paying job. Students who care about what they are working on will painstakingly try to perfect their projects. They don't have time to game the system and therefore have a hard time getting a coveted job.
Companies want to hire "the best" so they usually hire someone who can ace the company's interview. People who can ace the company's interview are usually those who studied for it.
I recently took over a codebase from an ex-employee who went to Google. People were happy for him but I am so indignant. His code caused me hell. One production bug after another led me to eventually throw out all of his code. His code was written by somebody who did not care and his tests were useless. I'm pretty sure during his time at our company he was focused on leetcoding so he could get somewhere better. I wanted to reach out to him on LinkedIn to give him a piece of my mind hoping it may make him a more responsible engineer but I decided against it. I focused on fixing the features for the users because it was the right thing to do.
I want to work with people who care about the product they are working on. People who care about building great products are not solving coding interview problems.
I'd say 99% of the job postings FAANG recruiters email me about sound brain meltingly dull.
http://www.paulgraham.com/lesson.html
You shouldn't be studying to get good scores. You should be studying to learn and understand.
Assuming you are taking classes to learn things rather then get a job.
We just need different coding interviews. Focus them on systems design, common pitfalls and 'fingertraps', good software engineering principles, etc. A "10x" software dev should definitely know her way around asymptotic O(n) analysis, she might also want to know about all sorts of exotic algorithms and data structures, but there's so much more to get educated about in this field, that could be tested for with relative ease.
Coding challenges are one thing, but you better have precise specs and actually give the candidates enough info to work on a tractable solution.
I think if companies are better at firing/managing mediocre employees, we wouldn't have so much bad apples trying to make their way in.
Part of the problem is the scarcity of engineers. There is an entire swath of great people, by that I mean decent folks who would be great at what-we-do, entirely avoiding the field because of per-conceived notions or some stigma or the other. If there a better and bigger pool of candidates, the bad ones will naturally leave the field.
Something happened between 2012 and today where you could get by one referral and a conversation with a tech lead. Maybe it's the influx or new grads entering the field.
I keep a "practice" repo on Github, where I put my solutions. Often, for an extra challenge, I'll prove the solutions correct or try to write clear explanations of how to solve the problems from scratch. (Proving something helps me to see the hidden structure upon which my intuition rests. Explaining something helps me to lock it in my head.)
Over the years, I have learned a lot from this practice and have built up a repo that serves to keep my memory fresh. Here are some fun examples:
https://github.com/tmoertel/practice/blob/master/dailycoding...
https://github.com/tmoertel/practice/blob/master/dailycoding...
https://github.com/tmoertel/practice/blob/master/water-holdi...
So, in at least one respect, I like the obsession with interview problems :)
Do you do "competitive programming"? You might like it. There's contests of various flavors out there to get a bunch of problems from.
Random recommendation: "Looking for a Challenge", a _beautiful_ in every way book of problems. Seriously check it out. Can almost guarantee you'll love it judging from those problems you linked.
Google Foobar is fun if you can get your way in. The codejam problems are nice (skip kickstarter mostly). codechef.com and codeforces.com have generally good problems (and fun contests if you're into that aspect).
I don't really do competitive programming, but I enjoy the problems. Thanks for recommending some great new sources to check out!
I'm terrible at code trivia type stuff. My Jr dev job I got from a company that asked me to build something for them. It wasn't big or useful, but it gave me a chance to show my thought process and there we go I got hired.
Since then it has been a great ride as I fix things as I make enhancements (I try to leave wherever I work a better place) and even built an application that complements their main application (customers love it).
Meanwhile some friends I talked to say they can't find good people .... but their interviews are all trees, and trivia and 'typical' interview type stuff that doesn't really demonstrate being a responsible coder, the ability to work independently, or just common sense....
Pretty sure I'm going to have to dive into that stuff if I ever decide to move on.
I’ve done this as an interviewer. I’ve created a fairly simple skeletal project with failing unit tests. The coding part of the interview was to make the tests pass by writing the code. It was a pair coding exercise.
Unless you are a founder or have significant equity, why should you “care about the product you are working on” more than enough to get a paycheck? It’s naive to think that a profit seeking employer cares about you. If you got hit by a bus tomorrow, they would send flowers to your funeral and have an open req for your position before you are buried.
While you may want to work with people who care about building great products, most people go to work every day for a paycheck. Why wouldn’t I optimize to play the game in a manner that increases the amount of my paycheck?
That being said, I personally don’t live on the west coast, have no desire to live on the west coast, and haven’t had an algorithm style interview in over 20 years when I was applying for a job doing low level cross platform C. I did get the job and they did need someone with algorithmic knowledge.
Going through these and writing up solutions seems like a decent hobby project, applicable to a lot of situations.
It's not about how smart you are or how well you will do. It's about how good you are at studying interview problems/the SAT. And even then it's a crap shoot if your admission reviewer/interviewer was in a good mood that day.
As much as it's suboptimal/unfair/whatever your objection is, your options are to not play the game (and miss out on the wealth of opportunity or cash) or to dive on in and accept reality.
The question is, whether they serve as a particularly good filter.
It’s working as intended.
As long as that's how it's thought of - I can see the value.
I think people are in the habit that it does a lot more than that, though.
1. People who care about building good products, leading to good careers.
2. People who care about their career for the sake of their careers. This group tends to focus on office politics.
Therefore, caring enough about their career to cram has not a signal for how much they will care about building great products.
That being said, Scala makes design questions much easier thanks to its type system.
I have noticed some colleges have been teaching more to the interview, so their grads can crush some problems in Python but fail when you ask them to implement a helper they were using. I am not talking about implementing a heap either, I am talking about merging objects.
Not “algorithm problems” or “search” - “we’ll ask you to revert a doubly linked list”.
It’s bizarre.
External recruiters do that all of the time. I worked with the same recruiter when I was trying to get a job and when I was hiring through him. I knew he prepped candidates so I had to have a different set of interview questions and different coding interview tests (with an IDE on a computer).
I know of one company where the hiring manager had all of the candidates do a merge sort on the board. He used the same interview question for years. All of the recruiters knew what to prep their candidates for.