12 years of professional coding, still haven't been able to use my data structures knowledge!
Data Structures for Coding Interviews
121–130 of 238 posts
Re: Data Structures for Coding Interviews
#122Earlier quoted context omitted.
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…
1111 1111 = 255 1 0000 0000 = 256 Anyone who claims to understand integer overflow from actual experience, rather than memorizing textbooks, should know that by inspection. I'd forgive that in a CS grad (possibly) but if someone claimed to have been working in C or other unsafe languages for more than a trivial amount of time I'd be very suspicious.
Re: Data Structures for Coding Interviews
#123The article is really well written and has amazing design, but honestly does not seem very helpful. Isn't most of this learned in the first year of university? Who is the target audience in that case? Given the title, I hoped to learn some lesser used data structures rather than what a pointer is. With that said, I do look forward to future articles!
Author here :) Thanks for the note--this is interesting. Target audience is folks who never learned this stuff, or learned it but forgot it. Interesting to hear you had a different assumption from the title. If you want something trickier, check these ones out: https://www.interviewcake.com/question/stock-price https://www.interviewcake.com/question/swift/find-duplicate-...
Suggestion: Don't show hints for steps I already skipped. I stopped at "We can do this without destroying the input.", but had to scroll through all the hints before reaching the one I needed.
Re: Data Structures for Coding Interviews
#124Re: Data Structures for Coding Interviews
#125Earlier quoted context omitted.
What's the data science site!
http://datascientistjobinterview.com
Re: Data Structures for Coding Interviews
#126Original Author here. Happy to answer questions about this piece or coding interviews in general! And eager to receive any feedback. Thanks for the post!
Some examples:
The integer overflow part has incorrect binary/decimal conversions all over the place.
The example hash function used (summing elements modulo number of buckets) could be dangerous. I'm not generally a fan of showing bad practice or incorrect examples when teaching, even at an early stage when the student isn't ready for the real deal yet, but if you must then you could warn the reader that it's a simplistic example for demonstration and shouldn't be used in reality. It would not make a good impression if a candidate said they knew about hash tables but then produced that function as an example of hashing.
Similar comments apply to the treatment of big O notation. I understand that your style is to try to avoid being scary and complicated, but big O is useful because it has a specific meaning. Even in the longer explanation, you hardly mention that fundamentally it is about scalability and bounds, and you mention the danger of overlooking the constant factor only briefly right at the end. Also, the casual initial characterisation as being relative to the size of the input sets up traps when dealing with more sophisticated data structures, such as graphs where you often need to refer to the number of nodes and/or edges when specifying complexities.
Re: Data Structures for Coding Interviews
#127Earlier quoted context omitted.
Job offerings look for "engineers" while they mean coders. Young person who think he/she does not count as engineer will pass over that job, despite being fully able to get it and work there. "You are not actually engineer" is bad advice in current job market. (I used to be that young person and used to pass on opportunities because of superficial reasons like that.)
-
Re: Data Structures for Coding Interviews
#128Earlier quoted context omitted.
Ah, the perennial apologetics of weaponized mediocrity. If you can't write a simple recursive algorithm that swaps two values (Max Howell), two nested for loops (DHH), or show me that you used Python at least once (uhh length? yes, there is this builtin, I forgot its name...), why would I want to hire you over someone who has seen a computer before? And to avoid being called hypocritical, here's off the top of my hea…
> why would I want to hire you over someone who has seen a computer before? Because, you know, they invented Ruby on Rails and Homebrew? Incredible, really. You were so adamant on being hostile that you managed to put yourself over Max Howell and DHH in a couple of sentences. These people have made valuable contributions to the tech industry as it stands today. This is a fact and not an opinion. They invented Homebre…
First, Homebrew is just a rehash of package managers that were available on unices for more than a decade. Then, from what I hear, Homebrew was (still is?) badly designed and implemented for quite a long time, which is not an evidence of author's high skills (as a programmer, anyway).
Re: Data Structures for Coding Interviews
#129Earlier quoted context omitted.
Good CS fundamentals are important because they are transferable skill to a wide array of problems a startup may face. Just because someone wrote an impressive framework or library doesn't mean given a complex problem outside of their known domain (web framework design or package management tool), they would be have the necessary background to solve it. With strong math and CS knowledge, you can reason through almost…
> Array of problems a startup may face. Not every company is a startup. I'd much rather say a company like Google might have problems that require deep knowledge both inside and outside of someone's domain, but startups - no. They need to ship and optimize on the go, rinse and repeat. > With strong math and CS knowledge, you can reason through almost any problem. Until you can't. Math and CS, while certainly giving n…
Exactly this. A company making microscopes probably doesn't need to hire biology PhDs, and wouldn't ask obscure biotrivia in an interview...
Re: Data Structures for Coding Interviews
#130Earlier quoted context omitted.
Better for competition who gets the job with the same qualification and skills maybe, better for you personally (in both terms of what you learn and how good jobs you get) - no.
-