Live data from Hacker News

A guide to learning algorithms through LeetCode

github.com

201–210 of 222 posts

Re: A guide to learning algorithms through LeetCode

#201
I am a self taught programmer (python). I learned things because they required to solve some problem. You face problem and then you find solution. I used to solve puzzles in childhood for competative exams. But now as adult, it is very difficult to connect with imaginary problems which you never deal in day to day life. It makes me feel empty - learning something to just get a job. Recently I picked up interest in OS because I started to notice my limit with application programming. I learn to write comments and importance of git, after working in startup where you keep wearning thousdands of hats daily and forgot what code last week. And I feel this is very organic approach to learn.

Being on both sides of table, whenever I conduct interview I just ask simple programs to do (mostly fizbuz) and try to gauge candidate passion by understanding projects s/he worked and problems faced. If candidate passes fizbuz, I believe s/he has basic understanding of logic. Other things can be thought easily if candidate has passion.

I have friends in university who only talks about algos but can't write single line of code (I am not blaming them, it is just their field doesn't require intense coding. What i am trying to say here is, writing good code is like craft. You need to write actual code to excel in craft. Solving leetcode problem successfully doesn't imply you can write good code automatically). Last time when I switched jobs, I studied couple of algos and now I forgot them. I am again switching and thinking to start with leetcode. The biggest problem in industry is hype. These days even small stupid IT shops are asking for hackerrank test with full stack developer. Lot of focus is still on memorization and hype.

Re: A guide to learning algorithms through LeetCode

#202

It's becoming obvious to me that my time is better spent learning to solve these riddles rather than actually becoming a better developer. I have a job search coming up at the end of the year and whilst I've managed to largely avoid companies that ask this type of question, I believe it's seriously constraining my career. I can't speak for everyone but the whiteboard interview has prevented me from leaving jobs earli…

Yes it is. I had to make this decision as to whether I want to work on my personal projects, explore interesting topics or grind leetcode. To actually work on good projects the first step is leetcode.

I have a lot of interesting projects and I can talk a lot about OS kernels and bluetooth. To get to companies working on such interesting projects the gate will be leetcode type judges website. The questions they later ask are rudimentary and none of your effort on going deep into the such interesting topics matter.

Re: A guide to learning algorithms through LeetCode

#203
post #55

Earlier quoted context omitted.

I am trying to resist cynicism, but I too am thinking that after my upcoming sabbatical if I want to get top dollar I should just invest in power-grinding at the leetcode gym. Still hoping to find a friendly startup though, since some of the MegaCorps are lifestyle-incompatible and I'm already used to making a lot less than Googlebucks.

> after my upcoming sabbatical if I want to get top dollar I should just invest in power-grinding at the leetcode gym Given that top dollar can mean potentially a six-figure raise over median salaries, that doesn't exactly seem like a bad deal. All things considered, Leetcode is remarkably accessible relative to the barriers of entry in other high-paying fields like law, medicine, certain finance careers, and so on.…

What do you recommend for revision of the different problems again? Won't that take much longer time?

Sometimes due to disconnect for say a week of preparation it takes much longer time to get back into the groove again.

Re: A guide to learning algorithms through LeetCode

#204

Earlier quoted context omitted.

> Unless you're implying a set of companies are all in league with each other to reduce churn/competition for talent This is a proven reality, and has been out in the open for a long time.

Then a few links to those proofs should be easy to produce?

On this same thread https://news.ycombinator.com/item?id=24182126

Re: A guide to learning algorithms through LeetCode

#205
post #123
post #102

Earlier quoted context omitted.

I don't think it's just about solving the problem. It's also about: - how you convinced yourself and the interviewer that your solution was correct (essentially an informal proof of your code) - how you test your code after you finish coding - what clarifying questions you asked to tease out a concrete question - what edge cases you thought of and how you handled them - how you handle bugs if they appear in the code…

From talking to some people who give out these interviews, most of those points really don't matter at all. What matters is A) getting a correct solution and B) being able to explain how you arrived at the solution. Tests, idiomatic code, clean design, etc are not expected and will inevitably waste precious time. Besides, the very nature of the interview (using a walled-off in-browser pseudo-IDE) restricts you from a…

How do you expect to convince the interviewer that your solution was correct without tests? How can you debug your code properly if you end up with a spaghetti mess instead of using a clean design?

Re: A guide to learning algorithms through LeetCode

#206
post #109
post #42

Earlier quoted context omitted.

There are plenty of competitive programming sites where you can grind rating just like you would for MMR rating in video games. For example CodeForces, AtCoder, TopCoder, and even LeetCode have rated contests

Thanks ghj. I was aware of top coder/leet code, though hadn't heard of code forces/at coder. For me the adventure game give a bit more concept linkage. Take Monkey Island, I can remember how to reply to many of the sword fighting insults, or what was needed to get pieces of eight via the cannon at the circus. There's something to be said for linking problems via a memorable story, giving examples and meaning from mul…

https://codecombat.com/

Re: A guide to learning algorithms through LeetCode

#208

Earlier quoted context omitted.

Then a few links to those proofs should be easy to produce?

On this same thread https://news.ycombinator.com/item?id=24182126

Yeah, I know about that one. Wondered if anything new had come to light.

This was 10 years ago and involved 8 companies.

Concluding from one crime that they all do it, and that's just what those people are like, you can't trust them etc, is an impulse we all do well to resist.

Of course, concluding that nothing like this will ever happen again is also naive. The incentive to cooperate is certainly still there.

My impression is that since the 2010 case, wages have gone up dramatically in that class of companies. There are also more big companies with owners who aren't pals from before. I think. Just guessing, relly.

Re: A guide to learning algorithms through LeetCode

#209

Earlier quoted context omitted.

The popular sentiment on computer science knowledge has done a complete 180 in the past several years. Not that long ago, it was popular to complain that junior SWEs didn't really understand the algorithms, the data structures, and what was going on behind the scenes. The complaint was that they were just copy and pasting from internet searches until things sort of worked on their machine, but they couldn't recognize…

> Personally, I've never met anyone who was good at Leetcode yet produced bad code in production. I'm sure there's someone out there who knows a guy who knows a guy who can somehow ace Leetcode but can't write an efficient website backend, but it's not the norm. Weird. Ability to leetcode doesn't mean you know what is happening in e.g. an RDBMS. We've had people good at leetcode write a single query to delete hundred…

Doesn't leetcode also have sql questions?

Re: A guide to learning algorithms through LeetCode

#210

Earlier quoted context omitted.

It’s been really stressful. I know python, but not really any other languages. I’m able to get work done. But I’m really nearly the same as a fresh grad. But really, I was just bumming around, then studied for four months and destroyed their algorithms questions, so much so that expectations for me are really high. But all I know is leetcode, literally nothing else...

Being on other side of the interviews like this , trust me most interviewers know that . The logic being if you can pick up leetcode in few months you can pick up most things on the job fast. Understand that interviewers are first and foremost are looking for ability to learn and understand complex topics , it is not all that important which specific topic it is. nobody really knows what you will be working on by the…

N = 1 but here we go. Let's look at the CS bachelor/master offered at the Vrije Universiteit Amsterdam [0]. The truth is probably somewhere in the middle and I understand that university programs are heterogeneous.

So let's look at my university experience and use your post as a checklist, for funzies! :D

Functional programming: covered

Dev tooling: covered to some extent through electives where you'd teach it yourself (I also call it the Magical Course) [1]

MVC: Magical Course

event programming: never heard of it :) Reading the wikipedia page, the following courses will probably help in aiding understanding:

+ Hardware interrupts: kernel programming, binary and malware analysis and hardware security

+ User events (e.g. via JavaScript): The Magical Course and Computer Graphics

CQRS: never heard of it :D And while I get the need when reading the article from Martin Fowler, I do not have a backlog of knowledge where I've encountered this before.

Simple app: computer graphics, the Magical Course, Distributed Multimedia Systems (the practical assignments were in HTML5/JS).

Cloud vendors: nope, I learned about that when I started teaching for a coding school

zipkin, istio, helm, grafana: never heard of it :D

be able to grok a explain analyse and fine tune a 500GB dB: No. We did learn SQL though and how to model relationships with UML and entity diagrams.

it is unlikely a fresh grad has production experience: I do, because my thesis was harder than whatever production experience I was acquiring. Going to work as a web dev and web dev instructor was my form of fleeing for my much more difficult thesis. Also, computer graphics taught me volume as my OpenGL engine was 10K lines of code. The Magical Course allowed me to produce an app that I sold for 2000 euro's.

Diving into a 1 million line codebase: We did that way too briefly (the Linux OS) for just 15 minutes, unfortunately. The startups I've been at had about 100K lines of code for their complete product. In other words, a lot of companies don't have a 1M+ codebase.

Anyways, when you have someone from the Vrije Universiteit Amsterdam, you can have some idea of what they do learn ;-)

[0] My knowledge of the curriculum is a bit stale, so it could've changed.

[1] Whenever I use this sentence, I happen to refer to one course where the teacher decided not to really teach but coach and the goal was to teach yourself whatever you wanted. I happen to have learned a lot of practical stuff that otherwise wouldn't be covered. So did many others. What did I specifically do? I created an iOS app by following Hegarthy's Stanford-based iOS course online ( https://www.youtube.com/watch?v=gI3pz7eFgfo ).

Post reply on HN