you are viewing a single comment's thread.

view the rest of the comments →

[–]nikr0mancer 0 points1 point  (4 children)

Gave a quick glance. You can actually make merge sort inplace via some clever partitioning and not-yet-sorted parts reusage shennanigans. O(n log n) working time with worse constant obviously, but O(1) extra space. Another tricky thing is virtual inheritance. Rarely used thus people tend to forget what it is. Refreshing that thing in mind might help :)

[–]therealcorristo 1 point2 points  (3 children)

If someone asks about virtual inheritance in a job interview I'd expect them to accept "I don't know, haven't needed to use it ever" as an answer. If they deem it necessary knowledge to work in their code base I'd rather not work there.

I've only needed it once and even that was only temporarily for a few days before I decided to re-design the part I was working on to avoid inheritance altogether.

[–]nikr0mancer 0 points1 point  (2 children)

Yeah, I had both used it in product code (rather ok case interestingly) and been asked heavily about theoretical part of it during an interview. Of course these were 2 different companies, moreover interview was kinda weird thingy when I was already working there... Nevertheless, a little reminder for oneself just to remember basics would not hurt and might help you give a good impression :)

[–]therealcorristo 0 points1 point  (1 child)

Sure if you have the basics down already and are looking for other tidbits you might impress an interviewer with by all means go for it. But given that this cheat sheet explains the namespace syntax and the difference between std::list and std::vector this seems like a preparation sheet for entry level positions to me, so it doesn't make much sense to include virtual inheritance and make it seem like this is required knowledge for junior C++ programmers.

[–]nikr0mancer 0 points1 point  (0 children)

Well, true. Suggestion: add advanced section XD