Editorial / Best Answer
kurtz182
SINGLY-LINKED LIST
Preconditions:
Node A points to node C ; [NODE A]---->[NODE C]
Node B is an insertion node; Insert [NODE B]
Test cases:
TC1) You can insert [NODE B] after [NODE A]
TC2) You can not insert [NODE B] before [NODE A]
TC3) [NODE A] points to [NODE B] after insertion
TC4) [NODE B] points to [NODE C] after insertion
TC5) You can remove [NODE B]
TC6) [NODE A] points to [NODE C] after removal
DOUBLY-LINKED LIST
Preconditions:
Nodes A and C point to one another; [NODE A]<---->[NODE C]
Node B is an insertion node; Insert [NODE B]
Test cases:
TC1) You can insert [NODE B] after [NODE A]
TC2) You can insert [NODE B] before [NODE A]
TC3) [NODE A] and [NODE B] point to one another after insertion
TC4) [NODE B] and [NODE C] point to one another after insertion
TC5) You can remove [NODE B]
TC6) [NODE A] and [NODE C] point to one another after removal
Write test cases for printing Single Linked List and Double Linked List ?
Profile Answers by vtpraveen Questions by vtpraveen
Questions by vtpraveen
Editorial / Best Answer
kurtz182Profile Answers by kurtz182 Questions by kurtz182
SINGLY-LINKED LIST
Preconditions:
Node A points to node C ; [NODE A]---->[NODE C]
Node B is an insertion node; Insert [NODE B]
Test cases:
TC1) You can insert [NODE B] after [NODE A]
TC2) You can not insert [NODE B] before [NODE A]
TC3) [NODE A] points to [NODE B] after insertion
TC4) [NODE B] points to [NODE C] after insertion
TC5) You can remove [NODE B]
TC6) [NODE A] points to [NODE C] after removal
DOUBLY-LINKED LIST
Preconditions:
Nodes A and C point to one another; [NODE A]<---->[NODE C]
Node B is an insertion node; Insert [NODE B]
Test cases:
TC1) You can insert [NODE B] after [NODE A]
TC2) You can insert [NODE B] before [NODE A]
TC3) [NODE A] and [NODE B] point to one another after insertion
TC4) [NODE B] and [NODE C] point to one another after insertion
TC5) You can remove [NODE B]
TC6) [NODE A] and [NODE C] point to one another after removal
Related Answered Questions
Related Open Questions