Linked list implementation along with unit test [Round 2] The Next CEO of Stack OverflowLinked list implementation along with unit testUnit testing with a singly linked listImplementation of stackInsert a Node at the Tail of a Linked ListPython Linked List implementationDoubly-linked list implementation in Python with unit-testsQueue implementation using linked listSingly linked list data structure design, implementation and unit testingLinked List using templates and smart pointersLeetcode #146. LRUCache solution in Java (Doubly Linked List + HashMap)Linked list implementation along with unit test
What connection does MS Office have to Netscape Navigator?
Why do we use the plural of movies in this phrase "We went to the movies last night."?
How do I go from 300 unfinished/half written blog posts, to published posts?
Why does standard notation not preserve intervals (visually)
Can we say or write : "No, it'sn't"?
If a black hole is created from light, can this black hole then move at speed of light?
How to transpose the 1st and -1th levels of arbitrarily nested array?
How to make a variable always equal to the result of some calculations?
If the heap is initialized for security, then why is the stack uninitialized?
Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?
Do I need to enable Dev Hub in my PROD Org?
Why don't programming languages automatically manage the synchronous/asynchronous problem?
How did people program for Consoles with multiple CPUs?
What does "Its cash flow is deeply negative" mean?
Bold, vivid family
What happens if you roll doubles 3 times then land on "Go to jail?"
Make solar eclipses exceedingly rare, but still have new moons
How to subset dataframe based on a "not equal to" criteria applied to a large number of columns?
Is there a difference between "Fahrstuhl" and "Aufzug"
Is it ever safe to open a suspicious html file (e.g. email attachment)?
What is the result of assigning to std::vector<T>::begin()?
Different harmonic changes implied by a simple descending scale
Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?
Why does the UK parliament need a vote on the political declaration?
Linked list implementation along with unit test [Round 2]
The Next CEO of Stack OverflowLinked list implementation along with unit testUnit testing with a singly linked listImplementation of stackInsert a Node at the Tail of a Linked ListPython Linked List implementationDoubly-linked list implementation in Python with unit-testsQueue implementation using linked listSingly linked list data structure design, implementation and unit testingLinked List using templates and smart pointersLeetcode #146. LRUCache solution in Java (Doubly Linked List + HashMap)Linked list implementation along with unit test
$begingroup$
Thank you Henrik Hansen for the amazing code review. Here is the new LinkedList class and accompanying unit test after suggestions made by Henrik Hansen.
Here's the link to the previous code review:
Linked list implementation along with unit test
Implementation
/*************************************************************************************************************
*
* Special Thanks to Henrik Hansen for the awesome code review!
* Url: https://codereview.stackexchange.com/questions/216453/linked-list-implementation-along-with-unit-test
*
*************************************************************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
namespace DataStructuresAndAlgorithms.DataStructures
public class LinkedList<T> : IEnumerable<T>
class Node
public T Data get;
public Node Next get; set;
public Node Previous get; set;
public Node(T data)
Data = data;
private Node _head, _tail;
public T Head => _head == null ? throw new ArgumentNullException("Head is null") : _head.Data;
public T Tail => _tail == null ? throw new ArgumentNullException("Tail is null") : _tail.Data;
public LinkedList()
public LinkedList(IEnumerable<T> items)
foreach (var item in items)
AddTail(item);
public void AddHead(T item)
if (item == null)
throw new ArgumentNullException("AddHead: An item you are trying to add is not initialized!");
if (_head == null && _tail == null)
_head = new Node(item);
_tail = _head;
else
_head.Previous = new Node(item);
var temp = _head;
_head = _head.Previous;
_head.Next = temp;
public void AddTail(T item)
if (item == null)
throw new ArgumentNullException("AddTail: An item you are trying to add is not initialized!");
if (_tail == null && _head == null)
_tail = new Node(item);
_head = _tail;
else
_tail.Next = new Node(item);
var temp = _tail;
_tail = _tail.Next;
_tail.Previous = temp;
public void RemoveHead()
if (_head == null) return;
else
_head = _head.Next;
if (_head == null) return;
_head.Previous = null;
public void RemoveTail()
if (_tail == null) return;
else
_tail = _tail.Previous;
if (_tail == null) return;
_tail.Next = null;
public bool Remove(T item)
var pointer = _head;
while (pointer.Data.Equals(item) == false)
if (pointer.Next == null)
return false;
pointer = pointer.Next;
if (pointer.Previous == null)
// It is the Head
pointer.Next.Previous = null;
return true;
if (pointer.Next == null)
// It is the Tail
pointer.Previous.Next = null;
return true;
pointer.Previous.Next = null;
pointer.Next.Previous = null;
return true;
public IEnumerator<T> GetEnumerator()
var pointer = _head;
while (pointer != null)
yield return pointer.Data;
pointer = pointer.Next;
IEnumerator IEnumerable.GetEnumerator()
return GetEnumerator();
Unit Test
using System;
using Xunit;
using DataStructuresAndAlgorithms.DataStructures;
namespace DataStructuresAndAlgorithms.DataStructures.Tests
public class LinkedListTest
[Fact]
public void AddHead_Node_Should_Become_Head()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.AddHead(45);
// Assert
Assert.Equal(45, myLinkedList.Head);
[Fact]
public void AddTail_Node_Should_Become_Tail()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.AddTail(7777);
// Assert
Assert.Equal(7777, myLinkedList.Tail);
[Fact]
public void RemoveHead_Next_Node_Should_Be_Head()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.RemoveHead();
// Assert
Assert.Equal(2, myLinkedList.Head);
[Fact]
public void RemoveTail_Next_Node_Should_Be_Tail()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.RemoveTail();
// Assert
Assert.Equal(4, myLinkedList.Tail);
Presentation
using System;
using System.Collections;
using DataStructuresAndAlgorithms.DataStructures;
namespace DataStructuresAndAlgorithms.Presentation.Console
class Program
static void Main(string[] args)
RunLinkedList();
static void RunLinkedList()
System.Console.WriteLine("Running the LinkedList class");
System.Console.WriteLine("----------------------------");
var myLinkedList = new LinkedList<int>();
myLinkedList.AddHead(54);
myLinkedList.AddHead(44);
myLinkedList.AddHead(96);
myLinkedList.AddTail(300);
myLinkedList.AddTail(900);
myLinkedList.AddTail(77);
myLinkedList.Remove(900);
System.Console.WriteLine("HEAD = " + myLinkedList.Head);
System.Console.WriteLine("TAIL = " + myLinkedList.Tail);
foreach (var item in myLinkedList)
System.Console.WriteLine(item);
```
c# beginner linked-list unit-testing
New contributor
feature_creep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
Thank you Henrik Hansen for the amazing code review. Here is the new LinkedList class and accompanying unit test after suggestions made by Henrik Hansen.
Here's the link to the previous code review:
Linked list implementation along with unit test
Implementation
/*************************************************************************************************************
*
* Special Thanks to Henrik Hansen for the awesome code review!
* Url: https://codereview.stackexchange.com/questions/216453/linked-list-implementation-along-with-unit-test
*
*************************************************************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
namespace DataStructuresAndAlgorithms.DataStructures
public class LinkedList<T> : IEnumerable<T>
class Node
public T Data get;
public Node Next get; set;
public Node Previous get; set;
public Node(T data)
Data = data;
private Node _head, _tail;
public T Head => _head == null ? throw new ArgumentNullException("Head is null") : _head.Data;
public T Tail => _tail == null ? throw new ArgumentNullException("Tail is null") : _tail.Data;
public LinkedList()
public LinkedList(IEnumerable<T> items)
foreach (var item in items)
AddTail(item);
public void AddHead(T item)
if (item == null)
throw new ArgumentNullException("AddHead: An item you are trying to add is not initialized!");
if (_head == null && _tail == null)
_head = new Node(item);
_tail = _head;
else
_head.Previous = new Node(item);
var temp = _head;
_head = _head.Previous;
_head.Next = temp;
public void AddTail(T item)
if (item == null)
throw new ArgumentNullException("AddTail: An item you are trying to add is not initialized!");
if (_tail == null && _head == null)
_tail = new Node(item);
_head = _tail;
else
_tail.Next = new Node(item);
var temp = _tail;
_tail = _tail.Next;
_tail.Previous = temp;
public void RemoveHead()
if (_head == null) return;
else
_head = _head.Next;
if (_head == null) return;
_head.Previous = null;
public void RemoveTail()
if (_tail == null) return;
else
_tail = _tail.Previous;
if (_tail == null) return;
_tail.Next = null;
public bool Remove(T item)
var pointer = _head;
while (pointer.Data.Equals(item) == false)
if (pointer.Next == null)
return false;
pointer = pointer.Next;
if (pointer.Previous == null)
// It is the Head
pointer.Next.Previous = null;
return true;
if (pointer.Next == null)
// It is the Tail
pointer.Previous.Next = null;
return true;
pointer.Previous.Next = null;
pointer.Next.Previous = null;
return true;
public IEnumerator<T> GetEnumerator()
var pointer = _head;
while (pointer != null)
yield return pointer.Data;
pointer = pointer.Next;
IEnumerator IEnumerable.GetEnumerator()
return GetEnumerator();
Unit Test
using System;
using Xunit;
using DataStructuresAndAlgorithms.DataStructures;
namespace DataStructuresAndAlgorithms.DataStructures.Tests
public class LinkedListTest
[Fact]
public void AddHead_Node_Should_Become_Head()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.AddHead(45);
// Assert
Assert.Equal(45, myLinkedList.Head);
[Fact]
public void AddTail_Node_Should_Become_Tail()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.AddTail(7777);
// Assert
Assert.Equal(7777, myLinkedList.Tail);
[Fact]
public void RemoveHead_Next_Node_Should_Be_Head()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.RemoveHead();
// Assert
Assert.Equal(2, myLinkedList.Head);
[Fact]
public void RemoveTail_Next_Node_Should_Be_Tail()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.RemoveTail();
// Assert
Assert.Equal(4, myLinkedList.Tail);
Presentation
using System;
using System.Collections;
using DataStructuresAndAlgorithms.DataStructures;
namespace DataStructuresAndAlgorithms.Presentation.Console
class Program
static void Main(string[] args)
RunLinkedList();
static void RunLinkedList()
System.Console.WriteLine("Running the LinkedList class");
System.Console.WriteLine("----------------------------");
var myLinkedList = new LinkedList<int>();
myLinkedList.AddHead(54);
myLinkedList.AddHead(44);
myLinkedList.AddHead(96);
myLinkedList.AddTail(300);
myLinkedList.AddTail(900);
myLinkedList.AddTail(77);
myLinkedList.Remove(900);
System.Console.WriteLine("HEAD = " + myLinkedList.Head);
System.Console.WriteLine("TAIL = " + myLinkedList.Tail);
foreach (var item in myLinkedList)
System.Console.WriteLine(item);
```
c# beginner linked-list unit-testing
New contributor
feature_creep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
Thank you Henrik Hansen for the amazing code review. Here is the new LinkedList class and accompanying unit test after suggestions made by Henrik Hansen.
Here's the link to the previous code review:
Linked list implementation along with unit test
Implementation
/*************************************************************************************************************
*
* Special Thanks to Henrik Hansen for the awesome code review!
* Url: https://codereview.stackexchange.com/questions/216453/linked-list-implementation-along-with-unit-test
*
*************************************************************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
namespace DataStructuresAndAlgorithms.DataStructures
public class LinkedList<T> : IEnumerable<T>
class Node
public T Data get;
public Node Next get; set;
public Node Previous get; set;
public Node(T data)
Data = data;
private Node _head, _tail;
public T Head => _head == null ? throw new ArgumentNullException("Head is null") : _head.Data;
public T Tail => _tail == null ? throw new ArgumentNullException("Tail is null") : _tail.Data;
public LinkedList()
public LinkedList(IEnumerable<T> items)
foreach (var item in items)
AddTail(item);
public void AddHead(T item)
if (item == null)
throw new ArgumentNullException("AddHead: An item you are trying to add is not initialized!");
if (_head == null && _tail == null)
_head = new Node(item);
_tail = _head;
else
_head.Previous = new Node(item);
var temp = _head;
_head = _head.Previous;
_head.Next = temp;
public void AddTail(T item)
if (item == null)
throw new ArgumentNullException("AddTail: An item you are trying to add is not initialized!");
if (_tail == null && _head == null)
_tail = new Node(item);
_head = _tail;
else
_tail.Next = new Node(item);
var temp = _tail;
_tail = _tail.Next;
_tail.Previous = temp;
public void RemoveHead()
if (_head == null) return;
else
_head = _head.Next;
if (_head == null) return;
_head.Previous = null;
public void RemoveTail()
if (_tail == null) return;
else
_tail = _tail.Previous;
if (_tail == null) return;
_tail.Next = null;
public bool Remove(T item)
var pointer = _head;
while (pointer.Data.Equals(item) == false)
if (pointer.Next == null)
return false;
pointer = pointer.Next;
if (pointer.Previous == null)
// It is the Head
pointer.Next.Previous = null;
return true;
if (pointer.Next == null)
// It is the Tail
pointer.Previous.Next = null;
return true;
pointer.Previous.Next = null;
pointer.Next.Previous = null;
return true;
public IEnumerator<T> GetEnumerator()
var pointer = _head;
while (pointer != null)
yield return pointer.Data;
pointer = pointer.Next;
IEnumerator IEnumerable.GetEnumerator()
return GetEnumerator();
Unit Test
using System;
using Xunit;
using DataStructuresAndAlgorithms.DataStructures;
namespace DataStructuresAndAlgorithms.DataStructures.Tests
public class LinkedListTest
[Fact]
public void AddHead_Node_Should_Become_Head()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.AddHead(45);
// Assert
Assert.Equal(45, myLinkedList.Head);
[Fact]
public void AddTail_Node_Should_Become_Tail()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.AddTail(7777);
// Assert
Assert.Equal(7777, myLinkedList.Tail);
[Fact]
public void RemoveHead_Next_Node_Should_Be_Head()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.RemoveHead();
// Assert
Assert.Equal(2, myLinkedList.Head);
[Fact]
public void RemoveTail_Next_Node_Should_Be_Tail()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.RemoveTail();
// Assert
Assert.Equal(4, myLinkedList.Tail);
Presentation
using System;
using System.Collections;
using DataStructuresAndAlgorithms.DataStructures;
namespace DataStructuresAndAlgorithms.Presentation.Console
class Program
static void Main(string[] args)
RunLinkedList();
static void RunLinkedList()
System.Console.WriteLine("Running the LinkedList class");
System.Console.WriteLine("----------------------------");
var myLinkedList = new LinkedList<int>();
myLinkedList.AddHead(54);
myLinkedList.AddHead(44);
myLinkedList.AddHead(96);
myLinkedList.AddTail(300);
myLinkedList.AddTail(900);
myLinkedList.AddTail(77);
myLinkedList.Remove(900);
System.Console.WriteLine("HEAD = " + myLinkedList.Head);
System.Console.WriteLine("TAIL = " + myLinkedList.Tail);
foreach (var item in myLinkedList)
System.Console.WriteLine(item);
```
c# beginner linked-list unit-testing
New contributor
feature_creep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
Thank you Henrik Hansen for the amazing code review. Here is the new LinkedList class and accompanying unit test after suggestions made by Henrik Hansen.
Here's the link to the previous code review:
Linked list implementation along with unit test
Implementation
/*************************************************************************************************************
*
* Special Thanks to Henrik Hansen for the awesome code review!
* Url: https://codereview.stackexchange.com/questions/216453/linked-list-implementation-along-with-unit-test
*
*************************************************************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
namespace DataStructuresAndAlgorithms.DataStructures
public class LinkedList<T> : IEnumerable<T>
class Node
public T Data get;
public Node Next get; set;
public Node Previous get; set;
public Node(T data)
Data = data;
private Node _head, _tail;
public T Head => _head == null ? throw new ArgumentNullException("Head is null") : _head.Data;
public T Tail => _tail == null ? throw new ArgumentNullException("Tail is null") : _tail.Data;
public LinkedList()
public LinkedList(IEnumerable<T> items)
foreach (var item in items)
AddTail(item);
public void AddHead(T item)
if (item == null)
throw new ArgumentNullException("AddHead: An item you are trying to add is not initialized!");
if (_head == null && _tail == null)
_head = new Node(item);
_tail = _head;
else
_head.Previous = new Node(item);
var temp = _head;
_head = _head.Previous;
_head.Next = temp;
public void AddTail(T item)
if (item == null)
throw new ArgumentNullException("AddTail: An item you are trying to add is not initialized!");
if (_tail == null && _head == null)
_tail = new Node(item);
_head = _tail;
else
_tail.Next = new Node(item);
var temp = _tail;
_tail = _tail.Next;
_tail.Previous = temp;
public void RemoveHead()
if (_head == null) return;
else
_head = _head.Next;
if (_head == null) return;
_head.Previous = null;
public void RemoveTail()
if (_tail == null) return;
else
_tail = _tail.Previous;
if (_tail == null) return;
_tail.Next = null;
public bool Remove(T item)
var pointer = _head;
while (pointer.Data.Equals(item) == false)
if (pointer.Next == null)
return false;
pointer = pointer.Next;
if (pointer.Previous == null)
// It is the Head
pointer.Next.Previous = null;
return true;
if (pointer.Next == null)
// It is the Tail
pointer.Previous.Next = null;
return true;
pointer.Previous.Next = null;
pointer.Next.Previous = null;
return true;
public IEnumerator<T> GetEnumerator()
var pointer = _head;
while (pointer != null)
yield return pointer.Data;
pointer = pointer.Next;
IEnumerator IEnumerable.GetEnumerator()
return GetEnumerator();
Unit Test
using System;
using Xunit;
using DataStructuresAndAlgorithms.DataStructures;
namespace DataStructuresAndAlgorithms.DataStructures.Tests
public class LinkedListTest
[Fact]
public void AddHead_Node_Should_Become_Head()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.AddHead(45);
// Assert
Assert.Equal(45, myLinkedList.Head);
[Fact]
public void AddTail_Node_Should_Become_Tail()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.AddTail(7777);
// Assert
Assert.Equal(7777, myLinkedList.Tail);
[Fact]
public void RemoveHead_Next_Node_Should_Be_Head()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.RemoveHead();
// Assert
Assert.Equal(2, myLinkedList.Head);
[Fact]
public void RemoveTail_Next_Node_Should_Be_Tail()
// Arrange
int[] myNums = 1, 2, 3, 4, 5 ;
var myLinkedList = new LinkedList<int>(myNums);
// Act
myLinkedList.RemoveTail();
// Assert
Assert.Equal(4, myLinkedList.Tail);
Presentation
using System;
using System.Collections;
using DataStructuresAndAlgorithms.DataStructures;
namespace DataStructuresAndAlgorithms.Presentation.Console
class Program
static void Main(string[] args)
RunLinkedList();
static void RunLinkedList()
System.Console.WriteLine("Running the LinkedList class");
System.Console.WriteLine("----------------------------");
var myLinkedList = new LinkedList<int>();
myLinkedList.AddHead(54);
myLinkedList.AddHead(44);
myLinkedList.AddHead(96);
myLinkedList.AddTail(300);
myLinkedList.AddTail(900);
myLinkedList.AddTail(77);
myLinkedList.Remove(900);
System.Console.WriteLine("HEAD = " + myLinkedList.Head);
System.Console.WriteLine("TAIL = " + myLinkedList.Tail);
foreach (var item in myLinkedList)
System.Console.WriteLine(item);
```
c# beginner linked-list unit-testing
c# beginner linked-list unit-testing
New contributor
feature_creep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
feature_creep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
feature_creep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 15 mins ago
feature_creepfeature_creep
335
335
New contributor
feature_creep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
feature_creep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
feature_creep is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
);
);
, "mathjax-editing");
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "196"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
feature_creep is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f216503%2flinked-list-implementation-along-with-unit-test-round-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
feature_creep is a new contributor. Be nice, and check out our Code of Conduct.
feature_creep is a new contributor. Be nice, and check out our Code of Conduct.
feature_creep is a new contributor. Be nice, and check out our Code of Conduct.
feature_creep is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Code Review Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f216503%2flinked-list-implementation-along-with-unit-test-round-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown