4 ms·
An attempt of a framework for solving whiteboarding/Leetcode problems is helpful, and it should always invite us to ask what computer science pedagogy is missin
by Apocryphon 5y ago
An attempt of a framework for solving whiteboarding/Leetcode problems is helpful, and it should always invite us to ask what computer science pedagogy is missing. Any CS program worth its salt includes data structures and algorithms courses- they are simply fundamental elements of the discipline.
And yet, why are these interviews so difficult? I don't think it's simply an issue of many people having gone through these programs and failing to absorb or retain the material. Neither do I think there is a severe mismatch in the material covered and the interviews. Yes, some interview questions are awfully close to logic puzzles - having to know the two pointer trick for detecting cyclic graphs, what CS program covers that industry-specific technique? - but others are fundamental applications of trees, graphs, dynamic programming, etc.
Could it just be that academic CS doesn't approach solving problems in the same way as these interviews do? Are there meta-problem solving techniques that these courses simply don't cover? Heuristics that must be applied when one approaches a general problem before the topic is narrowed down? "Ah this involves a tree, ah this requires sorting, ah we should use a hash table?"
- wly_cdgr 5y agoWhy don't you think it's simply an issue of many people who go through CS programs failing to master the material? It's hard to imagine someone who did well in, say, Sedgewick's sequence at Princeton (which, by the way, is available on Coursera for free for anyone who didn't want to go to Princeton) - it's hard to imagine someone like that struggling with entry level tech interview questions
- Apocryphon 5y agoIs it? If it's so straightforward, then why don't all of the people who are struggling with these questions simply take the Coursera course? At the very least, these interviews require the applicant to be immediately familiar with any of the topics that might span a semester (or two) long course, so recall could be an issue.
- wly_cdgr 5y agoThey probably should! Also, recall would only be an issue if they didn't truly master the material. Do you need to recall how to ride a bike after you've learned to do it?
- Apocryphon 5y agoPerhaps not the most apt analogy, as that is a physiologically different form of memory: https://blog.cognifit.com/motor-memory/ https://blog.cognifit.com/motor-memory/ https://www.vanderbilt.edu/olli/class-materials/Neuroscience_April4th.pdf https://www.vanderbilt.edu/olli/class-materials/Neuroscience...
- Jensson 5y agoYou wont forget the basics of how to play chess either even if you haven't played it for 20 years, as long as you played it many times back then. I don't think there is a significant difference here, if you learned something properly then you wont forget it.
- copenja 5y agoThe human mind requires practice to retain skill and proficiency. Period. People who were solid engineers and later become executives, 20 years down the line many say they no longer can code. I've seen this many times. Where are you getting this concept that humans never forget skills? That's completely false.
- Apocryphon 5y agoCome to think of it, the basics of playing chess is of insufficient complexity to be compared to an algorithm interview. More like being able to mount basic strategies and chess moves. Not sure how the average player would be able to recall those if they haven't played chess in a long time, because they were instead playing games derived from basic chess moves but with very different game mechanics.
- ByteJockey 5y ago> Why don't you think it's simply an issue of many people who go through CS programs failing to master the material? That's still a problem with CS programs. They're passing people who haven't learned the material.
- Jensson 5y agoMost college programs has very straightforward tests designed to be easy to pass, and students usually try to learn as little as possible by memorizing the material they can memorize instead of internalising anything. This combination means that a large majority of students who graduate will have a horrible understanding of the material studied. And since students have a horrible understanding and try to memorize, if you design tests that aren't straightforward and easy then almost everyone will fail, so you can't do that... And then these students graduate, think that the paper is proof that they actually learned these things, but if you prod their knowledge then it all just falls down since there is no substance there.
- Apocryphon 5y agoThat is certainly a factor, and there is also an emphasis more on the mathematical proofs of algorithms than applications in such courses.
- Jensson 5y ago> That is certainly a factor, and there is also an emphasis more on the mathematical proofs of algorithms than applications in such courses. Proofs are great if you learn to write your own, but courses mostly just wants you to memorize proofs which isn't terribly useful. If your tests has a lot of problems where you need to write your own proofs then it is a pretty good course, but the normal case is that the test wants you to write down proofs from memory.
- BirdieNZ 5y ago> Yes, some interview questions are awfully close to logic puzzles - having to know the two pointer trick for detecting cyclic graphs, what CS program covers that industry-specific technique? My comp sci degree covered this, and it isn't a particularly prestigious university either. Most leetcode problems are just extensions of (or exact duplicates of) problems covered in my Data Structures and Algorithms class. It seems like some of the skill involved for passing leetcode interviews is pattern-recognition to quickly recognise the kind of problem and what the likely tools to solve it are.
- hello_moto 5y agoThere are some Universities that somehow use similar materials for their CS courses and their students happened to work for these big/sv hi tech companies that reached out their old algo trick questions and asked them during interviews. Not all schools picked up these tricks, unfortunately.
- BlargMcLarg 5y agoMost people have to learn loads of information in a short time and former information doesn't get practiced after. In the span of 5 years, I learned trees at the end of year 1 and a bit at year 2. I didn't need them for anything I did past that. It wasn't until I sat down and practiced a little I was able to think in trees again. Not everyone covers the same things. Loads of Leetcode tests and interviews apparently cover linked lists and tricks with linked lists. I got zero exercises on linked lists. Some structures require specific approaches, so if you have trouble getting a foot in, you'll fail miserably at any questions related to those structures no matter how simple or difficult. There are other obvious points, but CS is simply too large a field. What one considers fundamentals is something another never uses, not even in libraries or frameworks. Easier is to prove that the student can learn what is deemed on an equal level as something else, and give them the tools to learn more on their own should they require to do so. This all assumes the student in question has actually proven to know the material of the course, and the course covers some part of what people consider fundamentals. Things obviously change when considering some people get by despite not having proven they know the material, or CS courses missing these. I also can't help but feel there is some irony in CS courses trying to accommodate an ever increasing need for more practical skills, ditching CS fundamentals and practicing them to do so, only to be met with interviews which test CS fundamentals despite the work not needing any of it.
- rjzzleep 5y agoI'm absolutely baffled by some of the comments here. This is more akin to learning a language and learning grammar structures in a language. Once you have mastered the language you simply don't care about the linguistic structures. When you learn english you learn everything about verb placement, sentence composition and a whole lot of other things. Now, when you ask me about the meaning of grammatical structures I only know some of them because I'm learning Chinese and Japanese, but they're completely irrelevant to me when I'm thinking about anglosaxon or roman language. Worse yet, most of those structure I wouldn't be able to associate or name nowadays. There is a reason why recent graduates perform better at these interviews than seasoned engineers. Even for computational math where you have all the basics of calculus 1-3 and bunch of other things where you have to prove the theorems in the exams it doesn't mean you recall all of it forever. It's like saying if you really know how to use a fork you create one yourself.
- Jensson 5y agoYou don't have a mental visualization of code execution? Quicksort, merge sort, binary search, hashmaps etc are just one image each, as easy to remember as the face of a friend. I don't see how anyone would forget that, there is no way I'll accidentally rearrange things to think the nose is above the eyes etc, and that is how stupid it looks when people make mistakes in coding interviews.
- Apocryphon 5y agoIt's one thing to visualize, another to recall at will. Your friend is someone whom you've spent sufficient time with on at least a semi-regular basis to form emotional and mental bonds with, deep memories. How many times does a CS undergraduate re-implement sort algorithms? Not that most interviews actually ask one to regurgitate that from one's memory.
- Jensson 5y ago> How many times does a CS undergraduate re-implement sort algorithms You don't have to implement, you just need to know the theory of why it works. Then you just code it up based on that theory, it isn't hard to do at all. For example, merge sort explains itself, you partition and merge. That is all you need to remember. Hashmap is the same, you use a deterministic function to label objects and then put those into buckets, then you find them in the bucket with the same label later. These are like the basics of the basics.
- BeetleB 5y agoMost such courses don't give a typical Leetcode problem in an exam with a 30-35 minute time limit, replete with continuous interruptions from the examiner. It's a lot easier for me to do a Leetcode problem if I can explore and experiment a bit without having to verbalize my whole thought process. Also, this is nothing unique to SW. I come from an engineering background, and we had to do calculus in almost every engineering course. Yet I'm sure within 12 months of graduation, most of my fellow grads would struggle with most calculus problems. I was once criticized by my peers for asking a basic calculus question while conducting an engineering interview.[1] Just as with algorithms, you usually don't need calculus on the job. Looking at most of my SW development career, beyond the very basics (e.g. dictionary lookup is O(1) in Python), I probably needed algorithm knowledge on average once a year. And since almost none of my peers in most of the jobs have that knowledge: 1. Knowing it doesn't put me at an advantage within the company. It's a blind spot for everyone. Unless I happen to solve a serious business problem with that knowledge, which is very rarely the case (and likely why most people forget this knowledge). 2. My not knowing it won't put me at a disadvantage when it comes to career growth in the company. This is the reality for most non-FAANG SW jobs. I suppose the one benefit of all these Leetcode interviews is that a lot more people have an incentive to review/learn this material.[2] [1] Analogously, I was once criticized for being too tough when I asked a candidate to write a factorial function for a SW job. [2] Although perhaps not really. Last week I interviewed a candidate who knew the theory really well - he understood complexity really well and seemed to understand data structures quite well too. But he couldn't write a basic function to split a string of numbers that were comma delimited, and return it as a list of integers. In both the languages he claimed proficiency in, there is a standard function to split a string, and not only didn't he know the functions, he had know idea of the concept. A classic example of textbook knowledge vs experience (of which he had 3-4 years).
- danielvaughn 5y agoI completely gave up on giving whiteboard interviews after trying a couple of them. It's just so hard to get it right, and even if you do, I'm not sure you gain that much more useful knowledge as opposed to other interview styles.