Live data from Hacker News

Many hard LeetCode problems are easy constraint problems

buttondown.com

471–480 of 551 posts

Re: Many hard LeetCode problems are easy constraint problems

#471

Earlier quoted context omitted.

I haven't been asked leetcode questions in a while and when I was asked, it was an easy level problem. I don't know where they ask hard leetcode problems, I also never solved a hard leetcode problem on my own.

I'm routinely asked LC Hard questions in interviews. Sometimes more than one in one 45 minute interview. That said, I interview in silicon valley and I'm a mixed race American. (extremely rare here) I think a lot of people just don't want me to pass the interview and will put up the highest bar they can. Mind you, I often still give optimal solutions to everything within good time constraints. But I've practiced 1000…

I don’t think being mixed race is particularly rare in Silicon Valley?

Re: Many hard LeetCode problems are easy constraint problems

#472
post #358

Earlier quoted context omitted.

So all in all pretty basic stuff. Why would anyone worth their salt should have problem with that?

The hard part is realizing that the problem you're solving efficiently maps to a dynamic programming algorithm. You have to spot the opportunity for sub-problem reuse, or else the solution looks something like cubic or exponential (etc.)

> You have to spot the opportunity for sub-problem reuse

Which sounds exactly like what developers do in non boring parts of our job. If anything, the problem is that tests are being tightly timed, while time budget for real world task of this kind is usually more generous. On the other hand business time that company spends with inefficient solution or without one costs a lot of money so I can't blame companies for wanting employee who at least on toy problems can do that quick.

Re: Many hard LeetCode problems are easy constraint problems

#474
post #5

Great insight. But this is sadly not applicable to interviews. > It's easy to do in O(n^2) time, or if you are clever, you can do it in O(n). Or you could be not clever at all and just write it as a constraint problem This nails it. The point of these problems is to test your cleverness. That's it. Presenting a not-clever solution of using constraint solvers shows that you have experience and your breadth of knowledg…

> The point of these problems is to test your cleverness. Last round I did at Meta it was clearly to test that you grinded their specific set of problems, over and over again, until you could reproduce them without thinking. It's clear because the interviewers are always a bit surprised when you answer with whatever is not the text-book approach on both leetcode and on the interview guide they studied. Cleverness is…

Interviewers are typically surprised when you do something new because they reuse questions with a lot of people and eventually you end up seeing most variations of a solution.

Re: Many hard LeetCode problems are easy constraint problems

#475

Earlier quoted context omitted.

5 years ago you'd have a project like that, talk to someone at a company for like 30m-1hr about it, and then get an offer.

Did you mean to type 25? 5 years ago LC challenge were as, if not more, prevalent than they are today. And a single interview for a job is not something I have seen ever after 15 years in the space (and a bunch of successful OSS projects I can showcase). I actually have the feeling it’s not as hardcore as it used to be on average. E.g. OpenAI doesn’t have a straight up LC interview even though they probably are the m…

I don’t know if this has changed or perhaps was not representative but my entire loop at Anthropic involved people reviewing my code.

Re: Many hard LeetCode problems are easy constraint problems

#476

[flagged]

It seems like a moot point since there are already too many people who can clear leetcode hard than there are available positions that require it. It’s like scoring over 2 standard deviations on an IQ test, great, but by definition millions of people can do that. Edit: I’ve heard HFT firms are now moving to doing it on paper in person to prevent any kind of cheating for their interviews, which would make it a better…

Yes,that is better. From my own experience, LeetCode does indeed enhance one's logical thinking and coding skills. I believe this is the reason why FAG has always tested algorithm and data structure skills in interviews over the years.

Re: Many hard LeetCode problems are easy constraint problems

#477

Earlier quoted context omitted.

I feel like I'm entering a whole different universe on HN. Maybe things are this equal and fair on the senior, high-paying part of the spectrum that most people here seem to occupy, but in general there's a huge power imbalance in job interviews. Unless you're special and the company wants you in particular, it costs them nothing to turn you down in favor of the other 10000 perfect applicants, while you must find a j…

I agree that doing that without asking if they really mean "any" would in fact demonstrate traits that might be bad for a co-worker. If the candidate reads that this may be the case, asks for, obviously, that reason, and the interviewer confirms that they mean "any", then it's a red flag for that interviewer , at least, as a co-worker, if they go on to get upset over your choice, unless it's something where you're ob…

> If the candidate reads that this may be the case, asks for, obviously, that reason, and the interviewer confirms that they mean "any", then it's a red flag for that interviewer

I think the confusing part to me is why a rational candidate would assume it'd be a good signal to use an esoteric language to solve a problem in the first place. Like my understanding is that J would be a pretty inappropriate choice if you were trying to demonstrate your D/S knowledge, which is typically what that part of the interview is meant to be for. Apart from the round of applause on HN they'd receive later for being so very clever, what's the actual benefit for the candidate for using Prolog or J?

Re: Many hard LeetCode problems are easy constraint problems

#478

[flagged]

I understand that this is an advertisement for your product, but please do not do this here. Thank you.

You're right to point that out, thanks for keeping things honest. My intention was simply to offer a helpful TL;DR for a very long thread, as it's a feature of a project I'm working on (mentioned in my profile).

I'm trying to contribute value without being spammy. If this crosses a line for the community, I'm happy to listen and adjust.

Re: Many hard LeetCode problems are easy constraint problems

#479

Earlier quoted context omitted.

I'm routinely asked LC Hard questions in interviews. Sometimes more than one in one 45 minute interview. That said, I interview in silicon valley and I'm a mixed race American. (extremely rare here) I think a lot of people just don't want me to pass the interview and will put up the highest bar they can. Mind you, I often still give optimal solutions to everything within good time constraints. But I've practiced 1000…

I don’t think being mixed race is particularly rare in Silicon Valley?

Very rare. So is being American.

Re: Many hard LeetCode problems are easy constraint problems

#480

Earlier quoted context omitted.

I'm routinely asked LC Hard questions in interviews. Sometimes more than one in one 45 minute interview. That said, I interview in silicon valley and I'm a mixed race American. (extremely rare here) I think a lot of people just don't want me to pass the interview and will put up the highest bar they can. Mind you, I often still give optimal solutions to everything within good time constraints. But I've practiced 1000…

This is not how it works. The interviewer knows 1-2 problems and there is no time for profiling since they are rushing through their day, probably focused on their day to day work. You are the least of their concern, believe me. Source: we am a hiring manager.

I’ve been the hiring manager too. You’re severely underestimating how many people operate.
Post reply on HN