Live data from Hacker News

Data Structures for Coding Interviews

interviewcake.com

151–160 of 238 posts

Re: Data Structures for Coding Interviews

#151
post #147

Earlier quoted context omitted.

> I'd find it highly unlikely they could do that while being unfamiliar with core data structures and algorithms. A big reason to learn basic algorithms and data structures is not to reimplement them yourself but to help you design and understand your own algorithms and data structures. But you so rarely want to implement a new algorithm or data structure. I suspect someone who knows how to implement a red-black tree…

The analogy doesn't extend other fields, so I would be skeptical that it holds in computer science and software engineering. Consider, for instants, a data scientist who does great in Kaggle competitions but has a poor understanding of probability theory. That data scientist will not be able to estimate or control the error in their models effectively, and will not even know that there is a way to do so. You do not w…

Software development is the art of abstraction, and it works both ways. Do other industries have anything like the "not invented here" problem that software does?

Re: Data Structures for Coding Interviews

#152
post #105

Earlier quoted context omitted.

Are we now blaming young people for looking at employment perspective before picking up major? Or are we blaming them for trying to learn? Because last time students were mentioned, they were blamed for picking up unpractical major unlike everyone older in STEM who was supposed to make more rational choices (as supposedly proven by them not picking humanities by passion).

No one is blaming the youngsters, people here are blaming the inadequate teaching methods.

Please quote the phrase(s) in daliwali's comment blaming inadequate teaching methods.

Re: Data Structures for Coding Interviews

#153
post #149
post #135

Earlier quoted context omitted.

Or you can refuse to do that and then work on getting a position where you aren't treated like a monkey expected to do tricks on demand and also have a better wage and social status.

Of course your extra wage goes straight into maintaining that status with uncomfortable clothes, overpriced cars, a big house in the suburbs to support your trophy family who you then spend hours of unpaid overtime avoiding... I mean you do you, but any job is going to involve a certain amount of doing stuff; personally I find CS algorithm puzzles a lot more fun than status games.

Status games? Hours of unpaid overtime? What are you talking about? The engineering managers (below the "C suite") everywhere I've worked have more or less kept the same hours as I have, dressed to the same standard, and used the same commute options as anyone else.

Re: Data Structures for Coding Interviews

#154
post #151

Earlier quoted context omitted.

The analogy doesn't extend other fields, so I would be skeptical that it holds in computer science and software engineering. Consider, for instants, a data scientist who does great in Kaggle competitions but has a poor understanding of probability theory. That data scientist will not be able to estimate or control the error in their models effectively, and will not even know that there is a way to do so. You do not w…

Software development is the art of abstraction, and it works both ways. Do other industries have anything like the "not invented here" problem that software does?

I can't speak for other industries necessarily, but I would suspect the answer is "yes". It's certainly rampant in all forms of social science academia. It's mercifully absent from professional data science in many places.

Re: Data Structures for Coding Interviews

#155

Earlier quoted context omitted.

To be honest, your comment doesn't make you seem like you're someone who actually knows anything about or is particularly good at coding -- rather, it makes you seem like someone desperate not to have to compete with a larger field of candidates, and grasping for any reason you can find to claim they shouldn't be allowed to try for the same jobs as you. Also, I'm quite sure someone could easily come up with comments…

I didn't think their comment was arrogant. When I saw "Data Structures" for interviews, I didn't think it would be explaining binary to us.

Usually, any "(X) for Interviews" post is a review of things that in theory a programmer learns very early on and then forgets due to disuse (since most programming interviews are essentially pop quizzes on such things).

The ironic thing is that this biases toward the most newly-minted programmer; actual experienced working programmers rarely need to implement basic data structures or their relevant algorithms from scratch (they rely on existing implementations), and so move them to dusty disused corners of their minds, while newly-trained programmers with no job experience have been regurgitating these things on exams quite recently.

So even the dismissiveness is wrong -- the original commenter is, to be honest, less likely to pass such an interview without remedial study, compared to the "young, beautiful people drinking kombucha and listening to Spotify" being sneered at, who probably have been taught more recently and have it fresher in their minds.

Re: Data Structures for Coding Interviews

#156

I read this What happens if we have the number 256 in an 8-bit unsigned integer (1111 1111 in binary) and we add 1? The answer (257) needs a 9th bit (1 0000 0000). and I didn't read any further. I don't think many interviewers would be eager to continue after hearing that, either.

I think you're being a little bit unfair. The same block then continues: This is called an integer overflow. At best, we might just get an error. At worst, our computer might compute the correct answer but then just throw out the 9th bit, giving us zero (0000 0000) instead of 257 (1 0000 0000)! (Python actually notices that the result won't fit and automatically allocates more bits to store the larger number.) The ar…

Well he did say he didn't read any further.

Re: Data Structures for Coding Interviews

#157
post #144

Earlier quoted context omitted.

> Because the science and engineering cultures of computing have failed to address these effectively That doesn't automatically make coders 'Artists'. There is a huge gamut of software outside the CRUD world of HN. Software that runs mission critical applications like Mars Rovers, power plants, Public transport systems, etc. We should have a fair amount of rigour to ensure the software being written is rock solid, an…

Artizans, not artists. But I agree with your point, failure to understand hashtables is like failure to understand the secret nail in carpentry (I choose this as I've never understood the secret nail in carpentry and therefore do not count myself much of a carpenter). We shouldn't delude ourselves, software (at the moment) is a craft discipline and craft disciplines can have huge blind spots. Comp-sci needs to spend…

My bad, I misinterpreted your comment.

I second the artisanal mindset that you have elaborated, and it will be better for everyone if we adopt the craftmans mindset (Which Cal Newport also talks about). I personally feel that we should model Software Engineering like the Apprenticeship model in Germany. It would be interesting to see how it fares.

Re: Data Structures for Coding Interviews

#158
post #62

Hiring engineers based on data structure trivia is like hiring a marketing department based on spelling bee scores.

You'd really be fine hiring a senior developer that had no idea how a linked list, a hash table or a binary tree worked? Understanding which data structures are good for speed and memory usage is at a minimum required for memory constrained apps and dealing with large scale data.

> a senior developer that had no idea how a linked list

How do you become a "senior developer" without knowing this? That was one of the first data structures I learned about when I was 15.

Re: Data Structures for Coding Interviews

#159
post #147

Earlier quoted context omitted.

> Yes,I'd be fine with it as long as they could read and understand a table of data specifying the time and space complexity of various data structures and algorithms. I'd find it highly unlikely they could do that while being unfamiliar with core data structures and algorithms. A big reason to learn basic algorithms and data structures is not to reimplement them yourself but to help you design and understand your ow…

> I'd find it highly unlikely they could do that while being unfamiliar with core data structures and algorithms. A big reason to learn basic algorithms and data structures is not to reimplement them yourself but to help you design and understand your own algorithms and data structures. But you so rarely want to implement a new algorithm or data structure. I suspect someone who knows how to implement a red-black tree…

Yes, you should never be reimplementing something that's in a standard library and for what it's worth I would never expect an interview candidate to know how to implement a red-black tree.

What I meant was that knowing core algorithms and data structures is important so you can recognise familiar problems so you avoid reinventing the wheel + you know where to look for answers. Maybe you have to use some clever combination of data structures to model your data efficiently. Maybe your data is actually a graph so now you can lean on graph algorithms. Maybe you just realised you're naive implementation to answer some question about your data has n^2 growth so now you can consider if a different data structure would help.

Personally, I find people that have poor knowledge of data structures and algorithms are the ones that will reinvent the wheel the most as they don't know what exists already.

Re: Data Structures for Coding Interviews

#160

I read this What happens if we have the number 256 in an 8-bit unsigned integer (1111 1111 in binary) and we add 1? The answer (257) needs a 9th bit (1 0000 0000). and I didn't read any further. I don't think many interviewers would be eager to continue after hearing that, either.

Fixed!
Post reply on HN