2

So I'm graduating soon from my CS master and I will apply for software engineering jobs. After a lot of Googling I became aware of the kinds of questions they tend to ask. But I really found them exceptionally stupid. I mean why to ask a question that a person CAN answer but can't because it was a longtime ago since he learned the stuff? Seriously why?

I have learned all of those time complexities questions 4 years ago. Like what is the difference between LinkedList and Vector. Or what is the time complexity of adding/removing to/from a data structure X. At the time I learned them I knew everything, but now, heck no. Of course if I review them I can remember all of them, but it would require me couple days to do so. But even then, I might win the job interview, but then forget them afterwards during my work since I'll probably don't need those information, because I know the differences by experience. So when I code I know what is the most appropriate data structure to use, because I feel the difference from experience, but sometimes I can't just remember the time complexities for those. So again, I might do well in the job interview if i remember them, but after the interview I will definitely forget them! So what is the point?!!!

So if anyone can review them, so I don't really see the point of asking about them. So if I really really need to remember something about them during my job, I can just google it and know the answer in 10 secs!

closed as off-topic by gnat, Justin Cave, Garrison Neely, Jan Doggen, jcmeloni Dec 11 '14 at 13:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Real questions have answers. Rather than explaining why your situation is terrible, or why your boss/coworker makes you unhappy, explain what you want to do to make it better. For more information, click here." – gnat, Justin Cave, Garrison Neely, jcmeloni
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Complexity is not something you "feel" by experience; it's something you know or you figure out. Knowing the specific complexity details of obscure data structures by heart is rarely useful knowledge, but awareness of complexity and its importance in your implementation is critical knowledge. – Eric Dec 10 '14 at 23:41
  • 2
    @Eric - I'm not sure I agree. Especially in the modern age of big data, it's not uncommon for complexity to bite one in the ass - hard and memorably. – Telastyn Dec 11 '14 at 1:36
  • 4
    I hear you. It is like when history students are interviewed, and the interviewer asks them what date the american revolution was!!! Or how doctors get a bad rap when they google symptoms!!! Yick! Obviously you go to uni and study to have fun and express yourself, not to actually learn things! – bharal Dec 11 '14 at 6:40
  • 13
    They're asked to see if the candidate understands the subject matter. You obviously don't as you regard complexity as something to have been memorised and now forgotten. So basically the answer to why? is: to filter out candidates like yourself. – TheMathemagician Dec 11 '14 at 10:35
  • 3
    See the point in learning this stuff is school was because it helps you be more effective in your work but only if you actually know it not learn for a test and forget. One of the biggest things employers are looking for, especially at entry level where you have no effective experience, is the ability to use the information you learned which means you have to show that you actually learned something. – HLGEM Dec 11 '14 at 14:26
3

There are differing opinions, but here's how I see things. First a little background.

I've been a professional software developer since 1987 and on one level, I agree with you completely. Those type of hyper-specific questions are stupid (in my experience and opinion). I'm the type of person who can't remember algorithms and a whole bunch of other very specific things that come up in interviews. But they still keep asking them. What this means to me is that even though I think they're stupid, I still try to memorize the crap because I'm still going to get asked. I have no doubt though that such questions have cost me numerous jobs because it's simply not how I think. I'm not a reference source and I don't have rapid recall on hyper-technical details. But that doesn't make me a bad developer, by any stretch. It just makes me different. As I said though, it costs me jobs because not everyone understands that fully capable developers may indeed have a different thought process. It is what it is.

"But Chris, you said 'on one level' so what does that mean?"

It means that I have over 25 years of experience and that's what gets me jobs. As I said, I'm hurt by not being able to answer what I call "gotcha questions" focusing on specific detailed recall, but my experience makes up for that. Here's the other level. You have no experience that lets people forgive a lack of detailed recall.

Ultimately, they have to evaluate you on something and while the concepts might be rusty for you, you're simply going to have to suck it up and memorize, memorize, memorize.

You'll fail some interviews. We all do. But I promise you that you'll get better. We all do that too. So just do your best and have the best attitude that you can.

  • You definitely expressed what I wanted to say. Exactly hit the point. Exactly. Same mentality. – Jack Twain Dec 10 '14 at 22:53
  • It's good to know that I'm not stupid for keep forgetting those stuff – Jack Twain Dec 10 '14 at 22:53
7

I have learned all of those time complexities questions 4 years ago. Like what is the difference between LinkedList and Vector. Or what is the time complexity of adding/removing to/from a data structure X. At the time I learned them I knew everything, but now, heck no...

The interviewers ask these questions because they want to know:

  • Can you to make an informed choice of data structures? How do you choose between LinkedList or Vector or HashSet or TreeSet or maybe HashMap or TreeMap or MultiMap?
  • When given a programming task, can you recognize whether the computation should take linear time, super-linear time, quadratic time, cubic time, exponential time?
  • Having written the code, do you know the time complexity of the code you have produced?

The interviewers aren't asking you these questions just to have an excuse to reject you, or to show off their superior knowledge. They ask you about algorithms and data structures because they are looking for people who can independently produce reasonably efficient solutions to problems of some complexity, and who can contribute ideas in fairly high-level technical discussions. You are going to have a hard time convincing them you can do this if you can't answer basic questions about fundamental data structures.

Interview questions that can be answered by everyone, or by no one, are of no value in making hiring decisions. Some candidates are able to answer these questions without difficulty. They get hired.

  • +1 - seriously. I don't care if you know the time complexity of random access of a linked list. I care if you know (off of the top of your head) that using a linked list when you need random access is going to lead to abject failure in many scenarios. These things really do matter. – Telastyn Dec 11 '14 at 1:33
6

... most of the things you are asking really aren't super complex to explain and not what I would consider trivia.

I don't even have a formal comp sci background and understand enough about what you are using as examples to explain both 1) why is this important and 2) what is the answer. At the very least talk through the ideas the questions are getting at.

There is a huge difference between trivia questions and algorithm questions.

Using a different example, it's the difference between asking "what gear ratio does F150 use?" vs "what is the importance of a gear ratio in a car?" Answers to the first are lookups. But the second can be meaningful because it shows a deeper understanding of how cars work.

So when I code I know what is the most appropriate data structure to use, because I feel the difference from experience, but sometimes I can't just remember the time complexities for those. So again, I might do well in the job interview if i remember them, but after the interview I will definitely forget them! So what is the point?!!!

You feel the difference? Really? This... strikes me as an attitude which is rightly getting you disqualified.

  • Dude, you code from your gut. I think Colbert made a speech about this once. – bharal Dec 11 '14 at 6:38
  • +1 Nobody should have to memorize complexities. I actually think memorizing them is a bad choice even as a student because then you don't have a need to learn to derive them. I actually got asked a complexity question at my last interview and said something like "Well I don't know off the top of my head, but I'm sure I can figure it out ... the algorithm does A which is always of complexity X and then B which is fast but can worst case need Y so best case is Z and worst is W." The answer was correct, the interviewer got to see my reasoning, provided the average case himself and I got the job. – Sumyrda Dec 11 '14 at 6:41
  • 1
    @Sumyrda isn't that just proof that 1. you memorised complexities (X and Y in your example) and 2. that you need to memorise complexities to get a job? – bharal Dec 11 '14 at 11:34
  • @bharal 1. The point is that if you know the basic building blocks of complexities, then you don't need to memorize a whole bunch of them (the OP talked in days of work). You just take your basics and take it from there. 2. You need some knowledge and understanding of complexities to get a job, and imho that's ok if you wanna be a developer. But memorizing a bunch of algorithms with their complexities is neither necessary (see my example) nor sufficient (because it isn't worth much without the understanding part plus in the interview you won't be able to explain why it has that complexity). – Sumyrda Dec 11 '14 at 14:21
  • 1
    @bharal: I can drive a car. I haven't memorised how to open the door, put the foot on the kludge before starting the engine, how to shift gears and so on. I just do it. Sumyrda "just does" the basic stuff. While the OP thinks they need to be memorised but has forgotten them. – gnasher729 Dec 11 '14 at 17:14
2

The point is to get the job, assuming that's why you are interviewing with them. Nobody is forcing you to go through the interview process let alone review the material that you forgot.

You could keep an open mind and ask them why they are testing you on Data Structures and Algorithms. Data Structures and Algorithms is what separates someone who got themselves a CS degree from those who never did.

I'd say that the lack of exposure to Data and Algorithms, Machine Learning and Theoretical Computer Science can, in at least some circumstances, be crippling to a software engineer's effectiveness.

I forgot about algorithms and data structures shortly after I had passed my final exams on them - That was close to twenty years ago. Today, I find myself refreshing and expanding on my knowledge of data and algorithms and taking a serious stab at Machine Learning, formerly known as Artificial Intelligence.

Life does take strange turns and the turn I am taking is taking me away from web programming and into something that I find more exciting.

Not the answer you're looking for? Browse other questions tagged or ask your own question.