Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. CO+1 as point 2 is an answer and point 3 is valuable. But point 1? Doesn't the code scream "I'm learning stuff and here are my experiments with a linked list" ? Sure, since it's supposed to be in C++, it would look much better, if that list was a class, not a bunch of global variables, but isn't sense of such experiments obvious. Let me guess. You like to ask questions, that verify the ability to manipulate list nodes in an interview and you like when people fail.
      singulars
    2. CO@Maciej: Too often I see people "learning" C++ and they write code like this because they come from C# and Java land, where such code is not a problem. However, "idiomatic" Java or C# is horrendously bad C++ code. I always put things like this in here, even for beginners, because using `new` on structs is indicative of a misunderstanding of C++ object lifetimes. I wish someone had told me this before I went around writing garbage code for several years.
      singulars
    3. COAs for your last sentence, I have no idea about what you're talking about. I'm nowhere near in a position where I would ever be doing interviews, but if you were applying for a job working in C++ and did not know how to manipulate linked lists, you would not be getting a job with me. That's all covered in first year CS courses and is something that someone applying for a programming job should (at least conceptually) understand. (Of course, being able to rattle off perfect code on a whiteboard would not be required)
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload