Skip to main content
added 172 characters in body
Source Link
Sandro4912
  • 3.2k
  • 2
  • 23
  • 50

Edit: This code was reworked and repostetd under a new question: Generic Skip list implementation in C++ Version 3

Edit: This code was reworked and repostetd under a new question: Generic Skip list implementation in C++ Version 3

Notice removed Canonical answer required by Sandro4912
Bounty Ended with hoffmale's answer chosen by Sandro4912
Tweeted twitter.com/StackCodeReview/status/1016878485074309120
added 19 characters in body
Source Link
Daniel
  • 4.6k
  • 2
  • 18
  • 40

I continued the work on the Skiplist. I tryedtried to incorporate the improvements suggested. I still don't feel ready to add more stuff ( Iterator class, Template Skipnode). I think isit's better to first present the progress so far:.

A short summary of what has changed:

I added alot more comments and tryedtried to make the code in general more readable in general. I hope the code is now easier to follow. I think one of the reasons not many people commented the last time, was the missing explanations in the code.

The random generator was reworked like suggested.

I implemented the missing functions Copy Constructor, Move Constructor, Copy Assignment and Move assignment.

Head now doesn't hold key and value anymore, it only contains pointers.

I added Unit Tests in seperate cpp / h files to test the vector more systematically.

Random Generator Last timee it was suggestetd

Last time someone suggested to move Random Generator completlycompletely out of the class, and to put it in a seperateseparate class. I didnt understandedidn't understand how. Is the currentlycurrent implementation inside the class ok?

I continued the work on the Skiplist. I tryed to incorporate the improvements suggested. I still don't feel ready to add more stuff ( Iterator class, Template Skipnode). I think is better to first present the progress so far:

A short summary what has changed:

I added alot more comments and tryed to make the code in general more readable. I hope the code is now easier to follow. I think one of the reasons not many people commented the last time, was the missing explanations in the code

The random generator was reworked like suggested

I implemented the missing functions Copy Constructor, Move Constructor, Copy Assignment and Move assignment

Head now doesn't hold key and value anymore it only contains pointers.

I added Unit Tests in seperate cpp / h to test the vector more systematically.

Random Generator Last timee it was suggestetd to move Random Generator completly out of the class in a seperate class. I didnt understande how. Is the currently implementation inside the class ok?

I continued the work on the Skiplist. I tried to incorporate the improvements suggested. I still don't feel ready to add more stuff ( Iterator class, Template Skipnode). I think it's better to first present the progress so far.

A short summary of what has changed:

I added alot more comments and tried to make the code more readable in general. I hope the code is now easier to follow. I think one of the reasons not many people commented last time, was the missing explanations in the code.

The random generator was reworked like suggested.

I implemented the missing functions Copy Constructor, Move Constructor, Copy Assignment and Move assignment.

Head now doesn't hold key and value anymore, it only contains pointers.

I added Unit Tests in seperate cpp / h files to test the vector more systematically.

Random Generator

Last time someone suggested to move Random Generator completely out of the class, and to put it in a separate class. I didn't understand how. Is the current implementation inside the class ok?

Notice added Canonical answer required by Sandro4912
Bounty Started worth 50 reputation by Sandro4912
added 195 characters in body
Source Link
Sandro4912
  • 3.2k
  • 2
  • 23
  • 50

EDIT: It was commented that map is superior to skiplist with insert / delete. So which container would be better to use for a compare. Is there a common Skiplist implementation in c++ to use?

EDIT: It was commented that map is superior to skiplist with insert / delete. So which container would be better to use for a compare. Is there a common Skiplist implementation in c++ to use?

Source Link
Sandro4912
  • 3.2k
  • 2
  • 23
  • 50
Loading