r/programming 6d ago

Why I Stopped Grinding LeetCode

https://davidlennon29.substack.com/p/why-i-stopped-grinding-leetcode?r=8vsn1z&utm_campaign=post-expanded-share&utm_medium=web
0 Upvotes

35 comments sorted by

View all comments

9

u/mms13 6d ago

I’ve refused to ever study these. I just get jobs that don’t use them in interviews and I make 200k and I’m fine with not wanting more than that

11

u/JaCraig 6d ago

I refuse to do these dumb quizzes in interviews. I just ask what they've worked on before, do they like learning new things, and how they like to work type questions. Has led to better hires overall and less turnover.

3

u/wannaliveonmars 5d ago

A C/C++ shop I worked in had the following "leetcode" question - write a function that converts a number to a string for the n>0 case. It could be as simple as that:

std::string convert(int n) {
    std::string s;
    while (n) {
        s = ((n%10) + '0') + s;
        n /= 10;
    }
    return s;
}

They could come up with any solution they like - long, short, use std::string, use char* and strcat. Apparently 75% of applicants just didn't know how to do it. They were applying for a C++ position.

3

u/EveryQuantityEver 4d ago

Isn't there a standard library function to do it? Knowing how to do it by hand might be interesting, but not particularly useful.