Live data from Hacker News

Many hard LeetCode problems are easy constraint problems

buttondown.com

241–250 of 551 posts

Re: Many hard LeetCode problems are easy constraint problems

#241
post #167

My biggest problem with leetcode type questions is that you can't ask clarifying questions. My mind just doesn't work like most do, and leetcode to some extent seems to rely on people memorizing leetcode type answers. On a few, there's enough context that I can relate real understanding of the problem to, such as the coin example in the article... for others I've seen there's not enough there for me to "get" the ques…

The LC interviews are like testing people how fast they can run 100m after practice, while the real job is a slow arduous never ending jog with multiple detours and stops along the way. But yeah that's the game you have to play now if you want the top $$$ at one of the SMEGMA companies. I wrote (for example) my 2D game engine from scratch (3rd party libs excluded) https://github.com/ensisoft/detonator but would not b…

And nowadays people are blatantly using AI to answer questions like this (https://www.finalroundai.com/coding-copilot). Even trying to stumble through design questions using AI

Re: Many hard LeetCode problems are easy constraint problems

#242

Earlier quoted context omitted.

> Should be illegal honestly. I can't imagine this kind of entitlement. If you don't want to work for them, don't study leetcode. If you want to work for them (and get paid tons of money), study leetcode. This isn't a difficult aristotelian ethics/morals question.

I meant no human-in-the-loop wrt hiring, which is what I thought you were getting at.

It's the same exact thing - if some company makes you jump through hoops to get hired that you find distasteful just don't apply to company.

Re: Many hard LeetCode problems are easy constraint problems

#243

Earlier quoted context omitted.

IMO leetcode has multiple problems. 1. People can be hired to take the test for you - surprise surprise 2. It is akin to deciding if someone can write a novel from reading a single sentence.

Hiring people for the test is only valid for online assessment. For an onsite, its very obvious if the candidates have cheated on the OA. I've been on the other side and its transparent. > It is akin to deciding if someone can write a novel from reading a single sentence. For most decent companies, the hiring process involves multiple rounds of these challenges along with system designs. So its like judging writing a…

If they are on site why not interview them? If the purpose of these online assessments is to be the mouth of the funnel that process is starting to fail.

https://www.reddit.com/r/leetcode/comments/1mu3qjt/breaking_...

There are funded companies set up just to help you get past this stuff.

https://www.reddit.com/r/leetcode/comments/1iz6xcy/cheating_...

Personally I feel software development has become more or less like assembly line work. If I was starting out today I would seriously consider other options.

Re: Many hard LeetCode problems are easy constraint problems

#244

Earlier quoted context omitted.

That is what people miss about interviews. Often when you interview you don't have reasonable leads on any other job and so you don't feel like there is a choice since you likely need a job (unemployment rarely pays as well as a job). However interviews are not only about the company deciding if they will hire you, they are also about do you want to work there and convincing you to take the job if one is offered. So…

People don't miss that about interviews, they just know that the balance of power is so skewed that the interests of the employer become the only relevant part. The employer can keep going through hundreds of applicants until they find someone who's literally perfect in every single way, they have nearly unlimited time. Meanwhile, the applicants need a job now, any job at all, they're on a hard time limit until their…

I have to push back on the unlimited amount of time thing. Maybe in FAANG that’s true but in the places I’ve worked for, hiring is something that comes down from on high - someone tells us they need N bodies for some project, and we need to have a team hired by some deadline. We really can’t interview endlessly.

Re: Many hard LeetCode problems are easy constraint problems

#245
post #204

> Now if I actually brought these questions to an interview the interviewee could ruin my day by asking "what's the runtime complexity?" This completely undermines the author's main point. Constraint solvers don't solve hard leetcode problems if they can't solve large instances quickly enough. Many hard leetcode problems can be solved fairly simply with more lax runtime requirements -- coming up with an efficient sol…

> coming up with an efficient solution is a large part of the challenge

More of my work tends to be "rapidly adopting solution to additional and changing requirements" than "come up with most efficient solution", so why are we interviewing for something where in practice we just throw a couple extra instances at it? (Your specific job role may vary, of course, but I usually just increase the scaling factor)

Author's point is that coming up with the most efficient solution might not actually be a good measure of your real-world performance.

And that's been a longrunning critique of leetcode, of course. However, this is a neat framing where you can still use the same problems but give solutions that perform better when measured by "how adaptable is this to new requirements?"

Re: Many hard LeetCode problems are easy constraint problems

#246

My biggest problem with leetcode type questions is that you can't ask clarifying questions. My mind just doesn't work like most do, and leetcode to some extent seems to rely on people memorizing leetcode type answers. On a few, there's enough context that I can relate real understanding of the problem to, such as the coin example in the article... for others I've seen there's not enough there for me to "get" the ques…

Its not really memorizing solutions. Yes you can get quite far by doing so but follow ups will trip people up. However if you have memorized it and can answer follow ups, I dont see a problem with Leetcode style problems. Problem solving is about pattern matching and the more patterns you know and can match against, the better your ability to solve problems. Its a learnable skill and better to pick it up now. Persona…

Ironic that you’re touting these puzzles as useful interviewing techniques while also admitting that ChatGPT can solve them just fine.

If you’re hiring software engineers by asking them questions that are best answered by AI, you’re living in the past.

Re: Many hard LeetCode problems are easy constraint problems

#248

Earlier quoted context omitted.

Its not really memorizing solutions. Yes you can get quite far by doing so but follow ups will trip people up. However if you have memorized it and can answer follow ups, I dont see a problem with Leetcode style problems. Problem solving is about pattern matching and the more patterns you know and can match against, the better your ability to solve problems. Its a learnable skill and better to pick it up now. Persona…

It is and isn't. I'd argue it's not memorizing exact solutions(think copy paste) but memorizing fastest algos to accomplish X. And some people might say well, you should know that anyways. The problem for me is, and I'm not speaking for every company of course, you never really use a lot of this stuff in most run of the mill jobs. So of course you forget it, then have to study again pre interview. Problem solving is…

I’d say it’s not even problem solving and it’s more pattern recognition.

I actually love LC and have been doing a problem a week for years. Basically I give myself 30 minutes and see what I can do. It’s my equivalent to the Sunday crossword. After awhile the signals and patterns became obvious, to me anyway.

I also love puzzlerush at chess.com. In chess puzzles there are patterns and themes. I can easily solve a 1600 rated problem in under 3 seconds for a chess position I’ve never seen before not because I solve the position by searching some move tree in my mind, I just recognize and apply the pattern. (It also makes it easier to trick the player when rushing but even the tricks have patterns :)

That said, in our group we will definitely have one person ask the candidate a LC style question. It will probably be me asking and I usually just make it up on the spot based on the resume. I think it’s more fun when neither one of us know the answer. Algorithm development, especially on graphs, is a critical part of the job so it’s important to demonstrate competency there.

Software engineering is a hugely diverse field now. Saying you’re a programmer is kinda like saying you’re an artist. It does give some information but you still don’t really know what skill set that person uses day to day.

Re: Many hard LeetCode problems are easy constraint problems

#249

Earlier quoted context omitted.

People don't miss that about interviews, they just know that the balance of power is so skewed that the interests of the employer become the only relevant part. The employer can keep going through hundreds of applicants until they find someone who's literally perfect in every single way, they have nearly unlimited time. Meanwhile, the applicants need a job now, any job at all, they're on a hard time limit until their…

I have to push back on the unlimited amount of time thing. Maybe in FAANG that’s true but in the places I’ve worked for, hiring is something that comes down from on high - someone tells us they need N bodies for some project, and we need to have a team hired by some deadline. We really can’t interview endlessly.

It's also very expensive to interview, since you're typically paying people who make over $100 an hour to interview people and review their code.

Re: Many hard LeetCode problems are easy constraint problems

#250
post #169

Earlier quoted context omitted.

Its not really memorizing solutions. Yes you can get quite far by doing so but follow ups will trip people up. However if you have memorized it and can answer follow ups, I dont see a problem with Leetcode style problems. Problem solving is about pattern matching and the more patterns you know and can match against, the better your ability to solve problems. Its a learnable skill and better to pick it up now. Persona…

Leetcode with no prep is a pretty decent coding skill test The problem is that it is too amenable to prep You can move your score like 2stddev with practice, which makes the test almost useless in many cases On good tests, your score doesn't change much with practice, so the system is less vulnerable to Goodharting and people don't waste/spend a bunch of time gaming it

I think LC is used mostly as a metric of how much tolerance you have for BS and unpaid work: If you are willing to put unpaid time to prepare for something with realistically zero relevance with the day-to-day duties of the position, then you are ripe enough to be squeezed out.
Post reply on HN