Timeline for Doubly linked list class in C++
Current License: CC BY-SA 4.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 8, 2018 at 22:50 | comment | added | Mike Borkland |
5. "General constructor: can be used to create a list with any number of nodes, all with the same value." I added this because std::vector has a constructor that does that. Once I add a getter to DNode , maybe it will make more sense. Thank you for your suggestions!
|
|
May 8, 2018 at 22:49 | comment | added | Mike Borkland |
1. Yeah, I'm aware of the rule of five. Adding a move constructor and assignment operator is something I will definitely do. 2. I defined my srtd parameter as follows: when true, the list is guaranteed to be sorted; when false, it could be either sorted or unsorted. I did this to avoid the O(n) check to see if it is actually sorted. insert_sorted is a great idea. 3. Yeah, that message when the list is empty is probably not the best idea. 4. I can't believe I didn't think about a way to actually get the values out of the list. I will add a getter to the DNode class.
|
|
May 8, 2018 at 22:01 | history | answered | Josiah | CC BY-SA 4.0 |