```/***************************************************************************
* Author: Isai Damier
* Project: geekviewpoint
* Package: datastructure
*
* Description: A LinkedList is a data structure that allows access
*   to a collection of data using pointers/references. While an
*   array can also be defined as above, LinkedLists and arrays differ
*   in how they are stored in memory and in the operations they
*   allow. Unlike an array that must be stored in a block of memory,
*   the nodes of a LinkedList can be stored anywhere because each
*   node has a reference to the node that succeeds it. Because the
*   nodes are stored so loosely, inserting nodes into a LinkedList
*   is easy; whereas in an array, all the succeeding elements must
*   be shifted. Of course, insertion also means changing the size of
*   the array, which means creating the entire array anew.
*
*   Perhaps the greatest beauty of LinkedList is that it allows
*   accessing an entire sequence of nodes using only one variable:
*   a reference to the first node in the sequence.
*
*   Countless operations can be performed on LinkedLists. Following
*   are a few, ranging from the common to the very interesting.
**************************************************************************/

Node tail = null;

/*****************************************************************
* Statement:
*   Add element el before node n
*
* Time Complexity of Solution:
*   Best = O(1); Worst = O(n).
*
* Technical Details: The idea here is to insert element el between node
*   n and it's parent. So if node is the head of the list, el is added
*   before node n and thus becomes the new head; else, we traverse the
*   list looking for node n and it's parent so to add el between n
*   and the parent. If node n is not on the list, then element el
*   is added as the tail of the list.
*****************************************************************/
public void addBefore(int el, Node n) {
} else {
Node parent = null;
while (null != curr && curr.data != n.data) {
parent = curr;
curr = curr.next;
}
if (null != curr) {
parent.next = new Node(el, n);
} else {
}
}
}
}```
```public class SinglyLinkedListTest {

/**
*/
@Test