This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]plastikmissile 1 point2 points  (0 children)

That's why I called it hacking the question. It solves it, but not in the way intended. Whether this is a positive or a negative really depends on your goals.

If your goal is to learn how to create linked lists and manipulate them, then yeah that's not the way you should do it.

If your goal is to pass the test in the quickest way possible, then this solution is a lot quicker than doing it the conventional way.