Note that there are some explanatory texts on larger screens.

plurals
  1. USSebastian_H
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. COThis is strange, I did my own implementation and did a few manual test. I then took your code and made the same tests. The results are identical. All the basic operations should work correctly. Is there maybe something you have not considered. For example, should the list accept duplicates? If yes, in which order should they be. Should the duplicate be inserted before or after the existing elements. Are you absolutely sure that it doesn't matter if your data is `9` or `10`? If the order is examined or the list checked for a specific number, the test might fail. Otherwise I can't see a problem.
      singulars
    2. COHave you checked if the test case is faulty? I know you don't have them, but maybe you can ask someone. Have you asked other people if they've run into the same problem or if their code runs successfully? Everyone can make mistakes, even the one writing the test. You can look forever for an error in your code if the problem is actually on the other side.
      singulars
    3. COYour code pretty much seems to do what you want it to do. However in your text you say you want to add a node with data `9` but in your source it's actually `10`. Maybe that's the problem? Btw, forget my comment above, I just realized that in case 2 you meant that only the head node is in the list.
      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