Live data from Hacker News

Many hard LeetCode problems are easy constraint problems

buttondown.com

151–160 of 551 posts

Re: Many hard LeetCode problems are easy constraint problems

#151
post #95

Earlier quoted context omitted.

Like in 'can solve a leetcode question quickly', because that's what the interview rubric asks them to test for.

That is the acceptable public answer of course but it is a mind stopper. Obviously the definition comes from some person with some set of motivations and this seems to ignore that real and pertinent question.

It's just tradition for the sake of tradition. When cargo cult practice becomes industry culture. Like a much milder version of why medical residents are put through extreme sleepless wringers just because William Halsted was a cocaine addict.

Re: Many hard LeetCode problems are easy constraint problems

#152
post #71

Earlier quoted context omitted.

In what way? They're useful for toy problems like this but they're very slow on larger problems.

SAT solvers are used daily to generate solutions for problems that have literally millions of variables. So, what you said is just wrong on the face. Yes, some talented people can write custom code that solves specific problems faster than a general purpose solver, particularly for easy special cases of the general problem, but most of the time that results in the programmer recreating the guts of a solver customized…

I mean right tool for the right job. Plenty of formulations and problems (our job has plenty of arbitrarily hard graph algorithms) that have 90% of the problem just being a very clever reduction with nice structure.

Then the final 10% is either NP hard, or we want to add some DSL flexibility which introduces halting problem issues. Once you lower it enough, then comes the SMT solvers.

Re: Many hard LeetCode problems are easy constraint problems

#153

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…

> My biggest problem with leetcode type questions is that you can't ask clarifying questions. Huh? Of course you can. If you're practicing on leetcode, there's a discussion thread for every question where you can ask questions till the cows come home. If you're in a job interview, ask the interviewer. It's supposed to be a conversation. > I wouldn't even mind the studying on leetcode types sites if they actually had…

Many interviews now involve automated exercises on websites that track your activity (don't think about triggering a focus change event on your browser, it gets reported).

Also, the reviewer gets an AI report telling it whether you copied the solution somewhere (expressed as a % probability).

You have few minutes and you're on your own.

If you pass that abomination, maybe, you have in person ones.

It's ridiculous what software engineers impose on their peers when hiring, ffs lawyers, surgeons, civil engineers get NO practical nor theorical test, none.

Re: Many hard LeetCode problems are easy constraint problems

#154
post #95

Earlier quoted context omitted.

Like in 'can solve a leetcode question quickly', because that's what the interview rubric asks them to test for.

That is the acceptable public answer of course but it is a mind stopper. Obviously the definition comes from some person with some set of motivations and this seems to ignore that real and pertinent question.

Line engineers running interviews have stopped having any say in the corporate policies of tech firms years ago. They are cogs, not rockstars.

You are right, this definition does come from some person with some set of motivations, but that person is some mid/high-level manager who probably hasn't ever written a line of code in their life.

Re: Many hard LeetCode problems are easy constraint problems

#155

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…

"Fastest algos" very rarely solve actual business problems, which is what most of us are here to do. There's some specialized fields and industries where extreme optimization is required. Most of software engineer work is not that.

Re: Many hard LeetCode problems are easy constraint problems

#156

Earlier quoted context omitted.

In defense of questions like this, “willingness to prepare” is a significant differentiator

But what is it differentiating? And is it really the best evidence of willingness to prepare? My MSc and BA on the topics, my open source contributions, two decades of industry experience... Those aren't evidence of not only willingness but execution of preparation?

It is a differentiator when you are hiring straight from college. The fact we use this beyond entry level roles is a sign the company has lost the thread and is cargo culting.

Re: Many hard LeetCode problems are easy constraint problems

#157

Most interviews are based on the premise that if a diabetic can't synthesize their own insulin in their basement, they are somehow cheating at the game of life. If my wife's blood sugar is high, she takes insulin. If you need to solve a constraint problem, use a constraint solver. If your company doesn't make and sell constraint solving software, why do you need me to presume that software doesn't exist and invent it…

What?

Re: Many hard LeetCode problems are easy constraint problems

#158

Earlier quoted context omitted.

I was told to use ANY language in an interview. I asked them if they were sure, so I solved it with J. They were not too pleased and asked me if I could use another language, so I did prolog and we moved on to the next question. Then the idiot had the audacity to say I should not use "J and Prolog" but any common known language. I asked if assembly was fine, and they said no. Perhaps python or javascript. I did the r…

[flagged]

Sabotaging? The candidate learned that their interviewers, and probably the company as a whole, isn't curious about languages or stuff that is outside of their wheelhouse.

What if the interviewers decided to ask the candidate about their language choice and trade-offs between different languages? Wouldn't that actually give them more signals into the skill of the engineer, rather than just blindly following their script?

Re: Many hard LeetCode problems are easy constraint problems

#159
post #95

Earlier quoted context omitted.

Like in 'can solve a leetcode question quickly', because that's what the interview rubric asks them to test for.

That is the acceptable public answer of course but it is a mind stopper. Obviously the definition comes from some person with some set of motivations and this seems to ignore that real and pertinent question.

Things like age, class, education and educational institution, willingness to work long hours doing something you hate for a goal you don't care about except that it feeds and houses you.
Post reply on HN