15 ms·
Ask HN: Did preparing for LeetCode type of interviews improve your skills?
I'm not new to the field and I have nearly a decade years of experience under my belt. I'm currently job hunting and decided I'm not gonna shy away from LeetCode type of interviews as before (I used to refuse to proceed with any company that had this as part of their interview process) and actually give it a shot.
As I'm doing some Hackerrank/LeetCode exercises, I'm actually enjoying solving these puzzles. I'm wondering if anyone who went through this prepping for an interview ended up being technically better overall. I know that I rarely needed this kind of skill in my career, but also I'm wondering if there were cases where I did need them and I didn't know.
Cheers!
- ssaturn 5y agoI am on the job hunt right now with about 5 years of experience. How do you find jobs that do not require technical interviews? Every single company I have applied to (about 10 so far) has required LeetCode style interviews
- wreath 5y agoMaybe in Europe it is different? There is still a coding part, but is somewhat relevant to the job position (build an API that does xyz etc)
- zimpenfish 5y ago> Maybe in Europe it is different? There is still a coding part, but is somewhat relevant to the job position Anecdata: In Europe but have had more than a handful of these nonsense Leetcode tests. Normally for companies with an inflated sense of their own worth - but possible to spot this from their mission statement, website, etc. and avoid them.
- jamil7 5y ago> Normally for companies with an inflated sense of their own worth This is also my experience, crappy Berlin startups that pay poorly and expect you to jump through hoops and work long hours. I switched to contracting and haven't had to do any of these silly tests, I usually discuss the project and my past projects and that's enough. A few times I've been asked to do a take home challenge which I don't mind and actually quite enjoy. Separated from the interview process I find some of the leetcode type challenges kind of fun, like doing a puzzle but they have been of very little practice use to me in my work.
- redis_mlc 5y agoAs of 2020, most SV interviews for Devops/SRE were not Leetcode - just normal programming, though possibly kinda lengthy. In 2021, it's a few percent higher. The one I saw recently was related to checking for N matches against M permutations. All required passing a test suite.
- seestraw 5y agoFor all the hate these interviews get, they do make you a better programmer. Before doing these problems I had no framework for thinking about how to program optimally. Doing these problems helps a lot. Don't fall for the hate people give. Every selective interview process gets hate. It's extremely useful for your development as a programmer. Edit: I do think it's not good when there are bad interviewers. For example, interviewers who don't give you a chance to think, or expect you to know the perfect solution rightaway. Or just arrogant interviewers :(
- spoiler 5y agoI agree to an extent, but at my company we have hired a few very intelligent people who ace these leet code algorithmic interviews, but they're at the same time the most incompetent engineers in the company. On top of prematurely optimising code that executes once in a blue moon and creating an unnecessary maintenance burden, they also lacked any skill in designing codebases whatsoever, and generally pick the worst solution for a problem (which is sometimes detrimental to performance overall, even if the "local implemenation" is great) Most of my refactoring nightmare situations were caused by leetcoders. Maybw it's just anecdotal, but in my experience there's been a strong correlation. Also an aside: they tend to be quite a bit snobby/circlejerky and vastly overestimate their skills. IMO, leetcoding is a skill but not the most important one. And also, once you start approaching software as design/engineering, the leetcode will start coming gradually and naturally to you.
- ozim 5y agoI don't hate selective interview process. I hate it when interviewer is an asshole. Somehow in my experience companies that have 'Leetcode' or that kind of thing in process have interviewer that is an asshole. If someone thinks he is better than me just because he is in a position to ask questions, well that leaves me frustrated for the rest of the day after interview. It is specially frustrating when you already have the experience, I am now almost 10 years and a senior dev and I cannot really put up with it. When I was a junior trying to find any job I was not offended at all, but I still remember all bad interviews.
- jim-jim-jim 5y agoI thought it was a waste of time because the most optimal solutions tended to require a stateful, even pointer-diddling, style of code that doesn't align with what I do in the real world. I'm sure they're fun and enlightening to some extent, but I'm not really interested in programming like it's still the 90s. In Australia I have fortunately not encountered a company that uses these puzzles in interviews. I feel bad for my friends in America who have to practice them every time they switch jobs.
- xupybd 5y agoYeah I find in business software an optimal algorithm is not worth the cost of readability. Most of the applications I work with have moderate data and few users. It has to work robustly and has to be easy to modify.
- hnzix 5y agoWorking closer to the front end, I've found that a solid foundation in SQL (to prevent ORM explosions), regex and basic app architecture is far more useful than deep algo knowledge. I've had to use tree traversal like a handful of times and bit shifting like twice. Let's not talk about working with dates and times.
- rich_sasha 5y ago> Let's not talk about working with dates and times. Took me years of part-time use to really understand these. Still waiting for an opportunity to code any non-trivial data structure I meticulously learned about in the past.
- josephg 5y agoYou'll rarely find that sort of work when doing user-visible stuff, because most software doesn't have enough users or complexity to justify the cost of custom data structures. But if you look at the software running on your computer right now, you'll find these programs are chock full of clever data structures. (Eg VS code, firefox, nodejs, rustc, etc.) If you want that sort of work, you kind of need to be building software infrastructure. So, contribute to linux, mysql, firefox, ... or work at FAANG, Microsoft, Dropbox, or something like that.) Or work on a product that needs high performance (like video games) or has a lot of users (like Twitter).
- zaptheimpaler 5y agoNo I don't think it has helped my skills at all. In the rare one or two cases in my career where I've needed an advanced algorithm, I had plenty of time to look up the best way to do it online. I think it is important to know WHEN you're facing an algorithmic problem, and to be able to generalize your problem enough to recognize what kinds of algorithms might apply. But leetcode style questions as currently posed go way beyond that imo.
- SiqingYu 5y agoAFAIK lots of Chinese students go through more than six/seven hundred of LeetCode problems, at least thrice each problem, before they are ready for job hunting.
- stonekyx 5y agoKind of. When I was doing LeetCode, I tried to give myself an additional challenge by implementing in a "functional taste", that is, to make heavy use of immutable data structures and Java Stream API (I mostly used Java at the time). That did help me a bit in writing better functional code in general. The bigger benefit to me, however, was that I got more confident during the interviews.
- devit 5y agoThe basics are essential. If e.g. you don't know what an hashmap or a balanced search tree is, or that you can find common items between two sequences or find a shortest path in a graph with non-negative edges in O(n log n), or that you can't (as far as we know) solve SAT, max-clique or subset-sum in polynomial time then you should not be programming software to be used by others. Advanced algorithm design skill however is generally only useful if you are doing specifically algorithmic work.
- deleted 5y ago[deleted]
- thom 5y agoI think this is too strong an opinion to hold. I think there is great value in being able to put problems you face into some sort of detailed taxonomy, and either know directly or be able to find the correct/optimal solution for those problems. To be able to do that, you do have to be exposed to what exists in the body of computer science knowledge. But while I disagree with anti-leetcode people who just claim googling is enough, I do believe it's enough to know that something is a graph/tree/optimisation/whatever problem and google a valid implementation. Having an intuition for performance and complexity is also very useful, but not knowing the exact complexity of an algorithm isn't a blocker to good work. I think it's essential to have a good map in your mind. I don't think it's essential to have a photographic memory of every route through that map.
- phist_mcgee 5y ago>then you should not be programming software to be used by others I think that is a very broad statement that belittles the work of many developers. You don't present this as your opinion, you state this as fact. Your dictatorial attitude is exclusive and not helpful in a discussion about the usefulness of leetcode.
- amir734jj 5y agoI'm a PhD student with focus on compilers and algorithm. Leetcode scare me too. I currently work at FAANG and I had to spend a month practicing leetcode before I got my job.
- csdreamer7 5y agoYes, and no. I thought I was a good Ruby programmer, but preparing for a FB interview in Ruby, and bombing an earlier one, really showed me how slow I was with the syntax. Leetcoding really improved my grasp of the language.
- msteffen 5y agoMy feeling on this is mixed—I competed in ICPC in college, which is a competitive circuit of programming contests (like leetcode, but predating it) and went to the world finals, which is easier than it sounds but not nothing. I think there are a few levels on which this sort of practice might help your career, and the question of whether they do help depends on which level you mean: 1) Learning the algorithms. I agree with the general criticism that these algorithms aren't that broadly applicable. I work on data storage software, so we use a few relatively fancy data structures, but even so most of my day to day work isn't on the code that manipulates them. That said, I think succeeding at these contests (especially when they're timed) requires you to practice avoiding bugs, particularly off-by-one errors, and I think that practice is pretty broadly applicable. 2) Thinking in terms of data structures. The data structures that a program uses are a lot more important than the actual code. Some critics complain that programming contests teach you to write messy code. I think that the people who are really good at programing contests who write messy code (ime, it's more compact than messy) do it because they've trained themselves to look at a program and see the data structures rather than the code, and in my opinion that's a better way to think about a program. 3) Learning to get good at something in general. This is the main reward I feel like I've gotten from these contests. I think many skills in life (including job performance and career advancement) can be developed the same way: study the rules, study the best competitors to understand what's achievable and what techniques are available, make an attempt, try to understand the results you got, try to improve your approach, repeat. I think programming contests are a great place to learn to do this (among many others, of course).
- jameshush 5y ago"Learning to get good at something in general" is the real thing these kind of tests proxy for. There's a lot of things in life that are a pain in the butt, hard, and stupid that you just gotta do. I went through the leetcode grind a few times, the last time I went through it I ended up taking a job at a startup that I was using as a "practice" interview before the FAANG ones because I could relocate out of California. I never would have interviewed there though if I wasn't laser focused committed to leaving my previous job for a better opportunity. If you're the kind of person who grinds leetcode, you're _probably_ also the kind of person who spends the extra time reading all the documentation for redux. Or spends the extra time writing a tricky unit test before shipping something. That being said, there's still _plenty_ of people who fail leetcode phone interviews (e.g. myself) but go the extra mile, and FAANG companies still manage to let some questionable hires through the cracks. But engineer hiring is currently a filtering game, not a sourcing game. You can either learn the rules of Monopoly and play or sit in the corner during board game night and complain you're not playing checkers. shrug
- lordnacho 5y agoI would say yes. A few years ago I signed up for one of the test sites as an employer and downloaded all their tests. I then solved them myself, well sorta half of them. It's easy to say that such tests are useless, and they probably are as a tool for judging coder skill. However when I did a few of these it did open my eyes to a few common solutions that I could apply in various places in my code. If you read through an algo book you'll probably find a few things that are a bit surprising like Kadane's algorithm, or some things that you kinda know how to do but you need the last piece of the puzzle for, eg various graph algorithms (is there a loop etc). I'd say the main benefit is that it illuminates what kinds of things you can solve and what kinds of things are tricky (eg knapsack), which is a useful intuition to have.
- mvanaltvorst 5y agoI'm a bachelor student, but I trained for the international informatics olympiad in high school. These days, most of the programming I do is in web development where I do not need any of the relatively advanced algorithms I know. I do not think competitive programming has necessarily improved my web development skills, only that I write code faster. However, I do feel prepared in the sense that I would definitely recognise situations where dynamic programming/segment trees/sqrt decomposition would be of help. I thoroughly enjoyed getting the absolute most out of your CPU with C++. Sometimes I miss the obscure pointer arithmetic, bit twiddling with Fenwick trees, thinking of ways such that I can divide by const's instead of int's because the compiler can optimize those further. It's a special kind of feeling to solve problems by combining clever algorithms and pushing the hardware to what it is physically capable of.
- blackrack 5y agoI prepared recently for an interview like this and took my time to practice hackerrank puzzles. I'll admit that and I found myself re-employing one of the things I learned to creatively solve a problem, however this only applies to my personal/passion project which is mostly shader-based and where algorithmic optimization knowledge like this is highly useful and applicable. In every day work however, and the kind of work I'm doing for companies 99% of the time it's not useful, as you'd expect.
- the_arun 5y agoI would rather be happy to spend a day or two (or a week) solving their real customer problem & go through mutual learning process. That gives both sometime to understand each other & decide.
- Aachen 5y agoIn Europe we call that a trial period. In NL I'd expect it to be 2-3 months during which you get normal pay but your employer can let you go any time and you can also cancel any time. In Germany it's apparently more commonly 3-6 months and my contract said the cancelation term was 2 weeks which kind of defeats the purpose. As a Dutchman 6 months seems crazy to me, surely you can see if someone can walk the walk after some weeks, even if you're still onboarding them? And in the unlikely event they managed to hide their lacking skills, you tell them on their performance review, then they either improve or not, and if they don't you can let them go. Anyway, a trial period like you said seems like a better way to learn whether someone is a good fit for the team (and whether the employer is a good fit for you) as well as technically skilled than trying to do these coding interviews that seem to be overemphasised in the USA (we do them here too, but most of the time they sound very reasonable). It's a bit odd because from what I know of USA law, you're permanently on trial and can be fired with 2 weeks' notice regardless of having an indefinite-term contract. Might as well do two-week trials with anyone that seems promising if it's that easy to let someone go.
- NateEag 5y ago> It's a bit odd because from what I know of USA law, you're permanently on trial and can be fired with 2 weeks' notice regardless of having an indefinite-term contract. It's actually easier to fire someone here than that makes it sound - many US states have what's called "at-will employment", which means that you can be fired from a job for any not-illegal reason with no notice.
- sanxiyn 5y agoI can't answer this, because I never prepped. In a sense I pre-prepped, because I competed in national level programming competitions while in school. My feeling is that it didn't help at all, because programming competition and programming are quite different skills. But I can't say for certain.
- Kim_Bruning 5y agoYou know how some people think that fizzbuzz is useless, and how no one ever uses fizzbuzz in real life? if you google it, you'll read things like "I have never needed to write fizzbuzz in production in my entire career!" or words to that effect. Of course, fizzbuzz is just checking if you grok some super basic programming concepts like logic, branching, and iteration. So what if you want to know if someone knows a little bit _more_ than just the basics? It's the exact same story. The ability to be able to work with algorithms and puzzle your way out of a problem is kind of important when you're doing some sorts of programming, especially when you need code that scales well (up OR down). If you're really bad at it, you might write pessimal code that even overheats your regular laptop; but fortunately most people aren't quite that bad. ;-)
- hocuspocus 5y ago> So what if you want to know if someone knows a little bit _more_ than just the basics? It's the exact same story. > The ability to be able to work with algorithms and puzzle your way out of a problem is kind of important when you're doing some sorts of programming, especially when you need code that scales well (up OR down). The main issue is that many companies don't do that. They ask leetcode questions because Google does it. But they expect you to have seen the problem earlier and memorized the solution.
- tmule 5y agoGoogle doesn’t ask Leetcode questions. The directionality runs the other way.
- hocuspocus 5y agoGoogle is very good at not asking these questions verbatim, but they're only variations of the same patterns. It's not like there are hundreds of unique concepts you can cover over the length of a typical interview slot. Anyway my point still stands. Big companies ask FizzBuzz++ because they want to see how you solve it, if you're able to communicate and write clean code. But unfortunately a lot of smaller ones don't invest the time that is necessary to have a good and consistent interview process. And more often than not, being able to regurgitate the solution to a problem you've already seen will definitely score you more points.
- deleted 5y ago[deleted]
- ping_pong 5y agoWhat LeetCode does really, really well is have a ton of test cases and chances are you will fail one of them and will have to try again. So they may explain a problem to you, but they never tell you the edge cases. For example, question #2 is adding two numbers where each digit of the number is a node of linked list. Simple things like carrying a 1 is easy to forget, but then you need to deal with other edge cases, like what if the lists aren't the same size, etc. So in terms of testing and finding edge cases to handle, it's really eye opening how deep you may need to go. When I do LeetCode, I try to write my program once and if I fail a test case, I consider my attempt a failure and move onto the next question. But otherwise, it doesn't make you a better overall programmer. There's no incentive to write maintainable code, and you're incentivized to get the code running as quickly as possible by trying to shave off milliseconds, which usually don't matter as much in real world situations.
- wheelinsupial 5y agoDo you mind elaborating on why all of these test cases doesn’t make you a better overall programmer? I think this would be a great thing to help in coming up with requirements and writing code that doesn’t crash because of edge cases or malformed inputs?
- ping_pong 5y agoAs an engineer you need to know how to be efficient with code. Not every single test case needs to be handled otherwise your code becomes unwieldy and brittle. Sometimes it's okay to handle an exception, write to the log so that you can detect something went wrong, and move on.
- gherkinnn 5y agoNever came up in interviews, but doing a few challenges once in a while are a nice change from my normal job. Both in topic and programming style. The problems are small, isolated, and usually come with an irritating edge case.
- ggambetta 5y agoForced me to learn dynamic programming, which had been completely absent during my CS degree :(
- Dave3of5 5y agoI have 15 years working for a bunch of unknown small businesses under my belt so I'm in a similar situation. The answer for me is a resounding no it did not help in the slightest. I too actually enjoyed doing these problems personally. I think the types of companies using these tests are the big FANG type companies and they are mostly recruiting more junior people so for them 10, 15, or 25 years experience doesn't matter. They don't care how long you've been working just if you can balance a binary tree or solve NP hard problems in under 15 minutes. So if you are applying for a FANG type job then yes definitely but the likelihood of you being picked is actually really low. Why you ask ? Because ageism is rampant in the tech sector so the FANG companies almost exclusively hire younger candidates (with 10 years experience you're not young). What about other smaller companies using similar tests though? That's true but I've found most small companies that do these types of tests don't hire for some reason. I think they reject a lot of employees as they think they will get better candidates. So the likelihood of anyone getting a job there is really low.
- dominotw 5y ago> Why you ask ? Because ageism They expect you to be M1 roles at facebook if you are in your 40s. Not compete with fresh grads.
- yoyonamite 5y agoMy guess for the small companies that don't hire is that it's the incentives. If my outcomes as the hiring person are that a bad hire is a large negative, a no hire is a very slight negative, and a good hire is a slight positive (possibly even neutral), I'm going to prefer no hire most of the time. I believe this is a fairly common decision matrix. For example: bad hire lowers managements' opinion of my performance and can be costly to team morale, especially if company culture makes firing difficult no hire can be blamed on lack of qualified developers rather than a competency issue good hire is nice, but if current development team can push back on workload, that benefits the company much more than the development team
- ronyfadel 5y agoThere’s a french saying: “ qui peut le plus, peut le moins.” If you can do difficult tasks, you’re capable of doing easier ones. Leetcode exercises helped me make coding a data structure to solve a problem, second nature. It gave me a problem solving confidence boost. Day to day, it will help you much less, but it comes in handy when you hit that use case Leetcode trained you for. Like realizing that a trie is valuable when doing a prefix name search in a Contacts application. You might have seen it in a CS class, but you won’t “believe” in it until you’ve implemented it yourself.
- pawelwentpawel 5y agoYes and I believe that the skills acquired made me more efficient as a programmer in certain areas - mostly optimisations and game programming. If you're organised and manage your energy wisely I'd say you could prepare well in ~2-3 months. While a lot might not agree, I think that instead of moaning on how to avoid the technical interviews and how useless the questions are the time is better spent on focusing and getting it done.
- austincheney 5y agoActually, usually the opposite. I do more challenging work as a hobbyist than as an employee, by several orders of magnitude. The cause for that is that as a web developer the emphasis on work and capabilities is entirely around knowledge of tools. If fact it is pretty extreme to the point of people often telling you to deliberately avoiding writing original solutions to problems, even if quick and minor, if instead you can download an untested package from the internet. See: * https://en.m.wikipedia.org/wiki/Invented_here https://en.m.wikipedia.org/wiki/Invented_here * https://news.ycombinator.com/item?id=27310461 https://news.ycombinator.com/item?id=27310461 I usually excel at the leet code portion of the interview and then immediately bomb the next round of interview when I advocate for writing code, originality, and portability.
- Tade0 5y agoA resounding no in my case, but that's because my line of work is mostly CRUD web applications. For such roles these tasks are mostly recruitment theatre. The puzzles are enjoyable though.
- sdevonoes 5y agoI have to thank LeetCode for one thing: it made me realise that, 1) preparing for an interview doing LeetCode puzzles two weeks before is like studying for an exam the day before. It's worthless. If you haven't been studying the subject for months (i.e., if you haven't been working as a software engineer for years), then nothing will make you pass the exam. And even if you pass the exam (because, you were lucky and the questions in the exam were the exact bits you just studied in the week before), you don't really know the subject: you'll forget what you studied the following week. 2) I can successfully avoid companies that require LeetCode interviews. I thought I would be out of the market if I rejected such companies, but it turns out that's false! In my limited experience, around 50% of companies out there do not require LeetCode-kind-of interviews. Don't get me wrong, I do enjoy solving programming puzzles but only on my free time, not because a company is telling me to do so.
- andyxor 5y ago>if you haven't been working as a software engineer for years i would correct this to "if you haven't been switching software engineering jobs every few years", which forces you to grind leetcode for months every time. It's always cute to see people saying nonchalantly "oh, i didn't have to do LC at all to get this (FAANG) job", and it turns out they went through the grind many times before, starting from annual internship hunts in college or competing in ICPC for years.
- josephg 5y ago> i would correct this to "if you haven't been switching software engineering jobs every few years", which forces you to grind leetcode for months every time. I know how obnoxious this is, but there are engineers out there (hi!) who can pass leetcode style coding interviews without studying because we love this stuff. I love algorithms and data structures. I'll happily discuss the relative advantages and disadvantages of vectors, linked lists, b-trees, etc for different tasks in a job interview. Or over dinner, or at the beach, or any and every time people let me get away with it. I've spent the last month or two optimising CRDTs, and I've used a bunch of data structure changes to improve performance in one of our benchmarks by 4500x (!) The goal of the interview isn't to "force you to grind leetcode for months". They're trying to filter out candidates who would need to grind leetcode in order to explain how a hash table works. They're looking for engineers like me, who graduate at the top 15% or so CS classes. Algorithm and data structure questions are asked because lots of programmers never touch this stuff in their day jobs. The people who actually know this blindfolded are in demand because we're useful on large projects with novel systems architecture. Thankfully, there's lots of other jobs out there where all they're looking for is a warm seat, closed jira tickets and happy customers. I go crazy doing jobs like that - so I'm glad lots of folks are around to do that work. If everyone was like me, we'd have 18 different web frameworks for every working website. I sometimes wish we used two different names for our profession in the same spirit as "electrician" and "electrical engineer" being different roles. Then we might all waste less time applying for the wrong kinds of jobs.
- tomerv 5y agoShort answer: Yes, it's useful sometimes. Longer answer: I always enjoyed these types of questions, and I sometimes solve them in my free time, e.g. Google's Codejam. So when I interviewed I didn't need to prepare specifically for the technical questions. Therefore it's a bit hard for me to say exactly what contribution these questions made to my skills, because it's something I've always done. Also, it's probably not relevant for 95%+ of my work. But once in a while when I do a code review, I see some convoluted piece of code that does something that can be done in 3 lines, like transforming some data from one structure to another. I feel that doing those types of programming tasks helped me find the most straightforward solution in these cases, where other people might only find more difficult solutions. By the way, a skill that is relevant to only 5% of my work is not as bad as it sounds. I'm currently finishing reading a book about presenting information visually. Doing presentations is probably less than 5% of my work.
- texaswhizzle 5y agoLeetCode is an excellent collection of problems you’ll never encounter in real life. If you don’t have a computer science background you might learn some things. Otherwise, it’s just solving silly problems for the sake of solving silly problems. It reminds me of when my college required linear algebra for my degree. Learning things that I knew without a shadow of a doubt I would never put to use again.
- arduinomancer 5y agoFunny, linear algebra is essential if you want to do anything machine learning or graphics related. More so than LeetCode
- sdevonoes 5y agoI would recommend you to read the classic books about algorithms and data structures instead (or whatever the topic is you want to learn about). In the long term it's better because: - well, those are classic books written by people who know. You'll learn a lot of high quality material - your future engineer peers (the good ones) will give a damm whether or not you know LeetCode puzzles inside out. They do care about you knowing the fundamentals - LeetCode is short-term planning: bread for today hunger for tomorrow. Make your future self a BIG favour and stop doing LeetCode, and start learning from trustful sources (whatever the topic is)
- wreath 5y agoAny recommendation for these classic books you mentioned?
- sdevonoes 5y agoI don't want to publicize any website in particular, but if you Google "best books algorithms", you'll probably get the ones everyone knows about: - Introduction to Algorithms by Thomas H. Corman - Algorithms by Robert Sedgewick & Kevin Wayne - The Algorithm Design Manual by Steve S. Skiena - Data Structures and Algorithms. Aho, Ullman & Hopcroft - ... Simiarly, just Google "best books software engineering".
- __exit__ 5y agoThank you!
- righttorepair 5y agoIntroduction to Algorithms by By Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein (https://mitpress.mit.edu/books/introduction-algorithms-third-edition https://mitpress.mit.edu/books/introduction-algorithms-third...)
- dominotw 5y agoleetcode classic books are are ctci and elements of programming interviews. I really enjoyed the latter, don't let the name distract you.
- yoz-y 5y agoFor me it was brushing up on the basics that helped (by following the theoretical classes). Both to be prepared for the interview and for general skill.
- pydry 5y agoI find it's usually a signal that: * The company is cargo culting Google or it is Google, in which case it's cargo culting hunting down people like Larry and Sergey. * The company makes decisions based upon safety in numbers. "Everybody" interviews this way, so if you're worried about justifying your process in future, it's a safe option. * If this system selected me for a $200k / year job, it can't be all that bad. * It does correlate somewhat with ability.
- MeinBlutIstBlau 5y agoAlso it's a standardized test to prevent bias. HR could've pushed for it too.
- MattGaiser 5y agoLeetCode is that stuff you cram into your head for an exam, spew onto a page, and then have forgotten by the time you are walking out of a room. So, no.
- adithyasrin 5y agoI'm working with the hiring without whiteboard interviews list here, and linked it up to available jobs. It's a bit tough to target it for EU, so if anyone has a company that fits, please let me know https://www.arbeitnow.com/hiring-without-whiteboard https://www.arbeitnow.com/hiring-without-whiteboard
- shime 5y agoThere's also curated list here: https://github.com/poteto/hiring-without-whiteboards https://github.com/poteto/hiring-without-whiteboards
- adithyasrin 5y agoyep, that's the list that I use as a source
- gameswithgo 5y agoI feel like they do but I haven’t “measured” it. They can be a great way to quickly learn a new language for sure though. Practice is good in basically all domains and these problems can be fun so seems good.
- henrik_w 5y agoI interviewed with 3 companies recently, and all had some kind of coding test, although not all of them were Leetcode-style problems. But I did practise on Leetcode before, and it was useful for passing the interviews. However, in my experience those kinds of problems don't make you a better developer. They are almost the opposite of what you do day to day as a developer. I've written more about it here: https://henrikwarne.com/2021/04/19/recruiting-software-developers-coding-tests/ https://henrikwarne.com/2021/04/19/recruiting-software-devel...
- mettamage 5y agoApparently, I have a very different perspective than most! I get the criticism, that was me for a long time, but nowadays I decided to give it a fair shot and have made up my mind. Disclaimer: I never got a job with them, but do practice them from time to time. What it doesn't train: - Software architecture (do Factorio and/or systems design interview questions) - Huge codebases - Library integration - Volume (aka lots and lots of code) What it does train (YMMV): - Precision: The goal is to write bug free code, this used to be a weakness of mine and now I'm less weak at it - Simulating code in your mind: related to precision, I use the debugger less and my mind more. - Finding ways to like the grind: nowadays I see data structures as micro-organisms or plants, they're so much fun to visualize that way! It taught me something about my personality (fantasy, whimsicality are my jam). If you know Vihart, that's how I think about data structures now. Because of this "epiphany" I suddenly find a whole new mode of liking abstract things that I previously didn't like that much. - Learning how to make small programs that do something meaningful-ish and reason about them. Opening a file and doing a for loop and do some manipulation is IMO not meaningful enough. Tweaking a binary tree is, because it simply doesn't feel trivial. Normally I have this feeling when I look at large codebases. - Practicing space/time complexity skills. This is super important, there have been moments where I really needed to rely on these skills because other engineers did some dumb things and where hogging the network or the CPU of the user's browser :/ - Muscle memory for the standard APIs of a language. My interview language is in JavaScript (on purpose because I'm a web dev). It's much easier now for me to write a map or a reduce. Before this, I needed to consult the docs, now I don't. I've subconsciously learned a lot of small little templates that allow me to write code quickly yet accurate. - There have been weird moments where I did need to rely on data structures (e.g. creating an efficient trading bot or making a computer graphics application for drawing on a canvas in a performant way) --- Is this the best way to get better at coding? No. But given that it does have some benefit to me and it might allow me to double or triple my income, why not try it? What I also like about it is that: if you know leetcode, then 50% of the companies open up to you. The other 50% are way more heterogeneous and the interview process feels too random. From the position I'm in, randomness is usually a bad sign (and sometimes it means I don't need to do anything to pass the interview, but that only happens once every 50 companies I apply for).
- ngc248 5y agoI did my engineering in Electronics and Communication, knew programming but was not that much into algorithms. When I started leetcoding for interview prep, at the start I found it hard, but now I actually find it interesting. Also was able to apply some of the algos to my actual work. So all in all leetcoding actually improved my skill.
- sjg007 5y agoTake your CS degree and get an MBA.. operate a higher level for Higher pay.
- tmsh 5y agoLet’s say you have some interesting challenges in a new space in deep learning and you like to hire people who can ramp up and learn the area relatively quickly. Or let’s say you have a massive set of services you need to integrate with to solve your next set of business commitments for the coming year. How do you hire folks who truly have the motivation and speed of learning to solve these areas on your team? Both are proprietary subject matters. Both haven’t really been done before and require a tenacious self-starter. In that sense leetcode + team player/leadership qualities might make more sense. Yeah it’s CRUD more or less 80% of the time re: code. But the ability to tackle ambiguity in an overwhelmingly large space and still be inventive: that’s what’s being tested. And as you get more experienced the technical assessment skews to system design which is also a good bar for just - how do you consistently simplify technical and organizational complexity? It’s why FAANG + unicorns’ compensation is high. It’s a correctly-priced asset in the market. To the business these are important functions. Does it have anything to do with pure programming for having fun’s sake? Why Linus created Linux? Only loosely.
- b20000 5y agoleetcode style interviews do not test the skills you need for what you describe, those skills come with experience, not by practicing leetcode until you can produce solutions in under a minute.
- randomopining 5y agoHe literally explained why they make sense. People who can "just do it" and learn fast and get it done.
- b20000 5y agoleetcode trains you to prematurely optimize and cannot teach you the skills that come with years of experience, which is what you need to be able to do what the above describes.
- randomopining 5y ago
- b20000 5y agoit doesn’t matter that you can solve them, you need to be able to solve them in under a minute while your interviewer is constantly distracting you. so basically, it has nothing to do with being able to build software. I have been writing code for more than 25 years now and graduated top of my class in CS. I also have a degree from a US ivy league school on top of my CS degree from europe. I developed and launched 4 succesful products. I won awards for my work and I’m a semi celebrity in my niche. I recently went through several FAANG loops and did not pass their retarded leetcode questions. each time i had the feeling it had to do with not being FAST enough or not producing the EXACT solution the interviewer wanted. what is funny is that I got one interview where the guy asks me to solve a problem that gayle mcdowell (cracking the code interview) spent ONE HOUR solving in a video provided as “training material” to candidates, YET they wanted me to do it in a few minutes WHILE EXPLAINING what i was doing. the above is why I no longer participate in coding interviews. for all those who think people who pass these interviews are “better” engineers: this particular FAANG has shipped broken SaaS products for years, despite having the “smartest” engineers on the payroll.
- random42_ 5y agoit doesn’t matter that you can solve them, you need to be able to solve them in under a minute while your interviewer is constantly distracting you. so basically, it has nothing to do with being able to build software. I realized that my issue with this style of interview are not the questions, but this exactly. I can solve lots of Leetcode problems, some just take me longer than others. It’s even worse when the interviewers behave like you described. Most I’ve met, luckily, were cool and just followed what I was doing eventually asking some questions and sometimes giving me pointers; the worse I’ve found would not accept any solution I proposed and would keep asking “how about not using extra space or how about solving in O(1) or how about you solve this in 5 seconds”. So freaking annoying.
- b20000 5y agoexactly, I had one interviewer who wanted me to write a function to divide x by y without using / or %. I proposed the obvious solution with a loop, which he quickly dismissed. I then proposed to try to do something with bit masks and shifts which he dismissed as well: "I don't think we'll be able to do that in the time we have, I never saw someone do that before in the time we have, etc". He then wanted me to guess that I should use a binary search for this. The resulting code was convoluted and hard to understand and made no sense to me. He had to drag me through it. The experience had nothing to do with how I develop software and write code on a day to day basis.
- gentleman11 5y agoCould anyone summarize for me what modern interview prep is like? Last I heard, it’s “learn Java only for the interview” then grind leetcode for 3 months. Whiteboarding probably doesn’t matter during a pandemic but that means you need correct runnable code to enter into some web ide?
- darepublic 5y agoReddits cscareerquestions sub seems obsessed with leetcode. As a Canadian my experience may differ from Americans, but for the jobs I applied to I don't think it often helped. Then again these were not faang jobs which are another Reddit obsession.
- yoav 5y agoNo
- bialpio 5y agoI found that preparing for LeetCode type of interviews improved my skills of solving LertCode type of problems and did not change how I performed in my day to day job. IMO the type of work is so dramatically different that I don't think they will bring any value, maybe except in the cases where you're dusting off some language you haven't been using in a while.
- markus_zhang 5y agoShould I treat them as brain gymnasiums such as Number Theory which few people ever needs for their career, but could improve problem solving ability in general? From my understanding those brain gymnasiums make your brain work harder and you have to concerntrate for longer period to get them solved. They also open new ways of thinking about the world.
- markus_zhang 5y agoI see some comments saying that Leetcode is not related to real life questions. Just curious how do I get real life questions, or to be more realistic, how do I get simpified real life questions? Is CodeWar a better alternative?
- closeparen 5y agoBuild something you want to use.
- markus_zhang 5y agoThanks, this is a sound suggestion.
- atomicity 5y agoA recently completed starter task for the project you are working on usually is a good idea. However, you need to make sure that the task is truly a starter task, not just a task that doesn't require much code. It is easy to create a task that requires too much time to do. As for simplification, I think it's a trap and not worth thinking about. The problem with LeetCode is that it's the result of oversimplifying. People focused too much on a "hard" part of software engineering, that, over the years, they filtered out all of the other skills that matter: making sure that the new functionality makes sense, figuring out how to make code testable, reading other people's code, already knowing existing protocols, making progress even if you don't know everything, knowing when the quality isn't good enough, and asking good questions.
- kodah 5y agoI came into software as a dropout. I'll spare you the back story, but it was for good reason. I dropped out junior year. 1. I think professionally testing algorithm knowledge is fine, but it needs to be one and done. I want a certification and I don't want to have to do it again. 2. This knowledge is largely useless in actual programming. It does teach me how to interrogate data structures and how algorithms work well with certain data structures. This kind of knowledge will only be relevant later in your career and at a certain type of company though. So, am I better? Yes, I think I am, but I don't think I'd thank algorithms for that. I thank an innate desire to learn that happened to be briefly applied to algorithms and data structures. The hyperfocus on algorithms misses the forest for the trees.
- bcrl 5y agoLeetCode didn't exist back when I was in high school doing programming contests. The team of 3 people I was part of did a few rather unusual things in part because of my exposure to Linux at the time, namely making use of tools like yacc and bision to quickly come up quickly with concise solutions to a number of the string parsing problems we encountered in the contests. I've never felt the need to explicitly study for interviews. Given the wide range of programming tasks I've encountered over the years, along with countless hours spent reading programming books and magazine articles, I know enough to be dangerous, and where to look when I'm not sure. Simply being aware that there is somewhere to to look is half the battle.
- captaincaveman 5y agoUseful for refreshing concepts I'd learnt/coded at Uni, 20 years ago and not used since ... which isn't as snarky as it sounds. Basically with a bit of drilling, a competent programmer should be able to get the hang of those questions, and maybe the fact you can get competent at doing tricky, niche things is a useful indicator. I wouldn't say doing leetcode would in anyway make you better at writing clean, well structured code, which is what we typically interview for in non FAANG. Probably does help sharpen your cracking out gnarly inner loop type coding skills i.e. better at writing a difficult function, doesn't do anything for how you would write the rest of the program.
- stillbourne 5y agoIt prepared me for leetcode interviews but I've still never encountered many of the problems they write problems for in the real world.