Class SinglyLinkedListNode<NodeVal>

data-structure-typed

Author

Tyler Zeng

Copyright

Copyright (c) 2022 Tyler Zeng zrwusa@gmail.com

License

MIT License

Type Parameters

  • NodeVal = any

Hierarchy

  • SinglyLinkedListNode

Constructors

Properties

Accessors

Methods

Constructors

Properties

_list: null | SinglyLinkedList<NodeVal>
_next: null | SinglyLinkedListNode<NodeVal>
_prev: null | SinglyLinkedListNode<NodeVal>
_val: NodeVal

Accessors

Methods

  • The insertBefore function inserts a new node with the given value before the current node in a singly linked list.

    Parameters

    • val: NodeVal

      The parameter "val" is of type "NodeVal". It represents the value of the node that you want to insert before the current node.

    Returns SinglyLinkedList<NodeVal>

    The method is returning a SinglyLinkedList.

Generated using TypeDoc