UNPKG

doubly-linked-list-typed

Version:
447 lines (438 loc) 101 kB
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>DoublyLinkedList | doubly-linked-list-typed</title><meta name="description" content="Documentation for doubly-linked-list-typed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"> <div class="tsd-toolbar-contents container"> <div class="table-cell" id="tsd-search" data-base=".."> <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div> <div class="field"> <div id="tsd-toolbar-links"></div></div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">doubly-linked-list-typed</a></div> <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header> <div class="container container-main"> <div class="col-content"> <div class="tsd-page-title"> <ul class="tsd-breadcrumb"> <li><a href="../modules.html">doubly-linked-list-typed</a></li> <li><a href="DoublyLinkedList.html">DoublyLinkedList</a></li></ul> <h1>Class DoublyLinkedList&lt;T&gt;</h1></div> <section class="tsd-panel"> <h4>Type Parameters</h4> <ul class="tsd-type-parameter-list"> <li> <h4><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">any</span></h4></li></ul></section> <section class="tsd-panel tsd-hierarchy"> <h4>Hierarchy</h4> <ul class="tsd-hierarchy"> <li><span class="target">DoublyLinkedList</span></li></ul></section><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:25</li></ul></aside> <section class="tsd-panel-group tsd-index-group"> <section class="tsd-panel tsd-index-panel"> <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"> <h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-chevronSmall"></use></svg> Index</h5></summary> <div class="tsd-accordion-details"> <section class="tsd-index-section"> <h3 class="tsd-index-heading">Constructors</h3> <div class="tsd-index-list"><a href="DoublyLinkedList.html#constructor" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a> </div></section> <section class="tsd-index-section"> <h3 class="tsd-index-heading">Properties</h3> <div class="tsd-index-list"><a href="DoublyLinkedList.html#_head" class="tsd-index-link tsd-is-private tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_head</span></a> <a href="DoublyLinkedList.html#_length" class="tsd-index-link tsd-is-private tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_length</span></a> <a href="DoublyLinkedList.html#_tail" class="tsd-index-link tsd-is-private tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_tail</span></a> </div></section> <section class="tsd-index-section"> <h3 class="tsd-index-heading">Accessors</h3> <div class="tsd-index-list"><a href="DoublyLinkedList.html#head" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>head</span></a> <a href="DoublyLinkedList.html#length" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>length</span></a> <a href="DoublyLinkedList.html#tail" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>tail</span></a> </div></section> <section class="tsd-index-section"> <h3 class="tsd-index-heading">Methods</h3> <div class="tsd-index-list"><a href="DoublyLinkedList.html#clear" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a> <a href="DoublyLinkedList.html#delete" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete</span></a> <a href="DoublyLinkedList.html#deleteAt" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete<wbr/>At</span></a> <a href="DoublyLinkedList.html#filter" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>filter</span></a> <a href="DoublyLinkedList.html#find" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find</span></a> <a href="DoublyLinkedList.html#findLast" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Last</span></a> <a href="DoublyLinkedList.html#findNode" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Node</span></a> <a href="DoublyLinkedList.html#forEach" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>for<wbr/>Each</span></a> <a href="DoublyLinkedList.html#getAt" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>At</span></a> <a href="DoublyLinkedList.html#getNodeAt" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Node<wbr/>At</span></a> <a href="DoublyLinkedList.html#indexOf" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>index<wbr/>Of</span></a> <a href="DoublyLinkedList.html#insertAfter" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>After</span></a> <a href="DoublyLinkedList.html#insertAt" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>At</span></a> <a href="DoublyLinkedList.html#insertBefore" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>Before</span></a> <a href="DoublyLinkedList.html#map" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>map</span></a> <a href="DoublyLinkedList.html#pop" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>pop</span></a> <a href="DoublyLinkedList.html#push" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>push</span></a> <a href="DoublyLinkedList.html#reduce" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reduce</span></a> <a href="DoublyLinkedList.html#reverse" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reverse</span></a> <a href="DoublyLinkedList.html#shift" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>shift</span></a> <a href="DoublyLinkedList.html#toArray" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array</span></a> <a href="DoublyLinkedList.html#toArrayReverse" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array<wbr/>Reverse</span></a> <a href="DoublyLinkedList.html#unshift" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>unshift</span></a> <a href="DoublyLinkedList.html#fromArray" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>from<wbr/>Array</span></a> </div></section></div></details></section></section> <section class="tsd-panel-group tsd-member-group"> <h2>Constructors</h2> <section class="tsd-panel tsd-member tsd-is-external"><a id="constructor" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="constructor.new_DoublyLinkedList"><span class="tsd-kind-constructor-signature">new <wbr/>Doubly<wbr/>Linked<wbr/>List</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#constructor.new_DoublyLinkedList" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The constructor initializes the linked list with an empty head, tail, and length.</p> </div> <section class="tsd-panel"> <h4>Type Parameters</h4> <ul class="tsd-type-parameter-list"> <li> <h4><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">any</span></h4></li></ul></section> <h4 class="tsd-returns-title">Returns <a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:29</li></ul></aside></li></ul></section></section> <section class="tsd-panel-group tsd-member-group"> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-is-private tsd-is-external"><a id="_head" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_head</span><a href="#_head" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <div class="tsd-signature"><span class="tsd-kind-property">_head</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:30</li></ul></aside></section> <section class="tsd-panel tsd-member tsd-is-private tsd-is-external"><a id="_length" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_length</span><a href="#_length" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <div class="tsd-signature"><span class="tsd-kind-property">_length</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:36</li></ul></aside></section> <section class="tsd-panel tsd-member tsd-is-private tsd-is-external"><a id="_tail" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_tail</span><a href="#_tail" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <div class="tsd-signature"><span class="tsd-kind-property">_tail</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:33</li></ul></aside></section></section> <section class="tsd-panel-group tsd-member-group"> <h2>Accessors</h2> <section class="tsd-panel tsd-member tsd-is-external"><a id="head" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>head</span><a href="#head" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature" id="head.head-1"><span class="tsd-signature-symbol">get</span> head<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></li> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:31</li></ul></aside></li> <li class="tsd-signature" id="head.head-2"><span class="tsd-signature-symbol">set</span> head<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:32</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="length" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>length</span><a href="#length" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature" id="length.length-1"><span class="tsd-signature-symbol">get</span> length<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:37</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="tail" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>tail</span><a href="#tail" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature" id="tail.tail-1"><span class="tsd-signature-symbol">get</span> tail<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></li> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:34</li></ul></aside></li> <li class="tsd-signature" id="tail.tail-2"><span class="tsd-signature-symbol">set</span> tail<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:35</li></ul></aside></li></ul></section></section> <section class="tsd-panel-group tsd-member-group"> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-is-external"><a id="clear" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="clear.clear-1"><span class="tsd-kind-call-signature">clear</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#clear.clear-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The <code>clear</code> function resets the linked list by setting the head, tail, and length to null and 0 respectively.</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:121</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="delete" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>delete</span><a href="#delete" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="delete.delete-1"><span class="tsd-kind-call-signature">delete</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">valOrNode</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#delete.delete-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">valOrNode</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:111</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="delete.delete-2"><span class="tsd-kind-call-signature">delete</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">valOrNode</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#delete.delete-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">valOrNode</span>: <a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:112</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="deleteAt" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>delete<wbr/>At</span><a href="#deleteAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="deleteAt.deleteAt-1"><span class="tsd-kind-call-signature">delete<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#deleteAt.deleteAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The <code>deleteAt</code> function removes an element at a specified index from a linked list and returns the removed element.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"><p>The index parameter represents the position of the element that needs to be deleted in the data structure. It is of type number.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>deleteAt</code> returns the value of the node that was deleted, or <code>null</code> if the index is out of bounds.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:110</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="filter" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>filter</span><a href="#filter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="filter.filter-1"><span class="tsd-kind-call-signature">filter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#filter.filter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The <code>filter</code> function iterates through a DoublyLinkedList and returns a new DoublyLinkedList containing only the elements that satisfy the given callback function.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span></h5> <div class="tsd-comment tsd-typography"><p>The <code>callback</code> parameter is a function that takes a value of type <code>T</code> and returns a boolean value. It is used to determine whether a value should be included in the filtered list or not.</p> </div> <div class="tsd-comment tsd-typography"></div> <ul class="tsd-parameters"> <li class="tsd-parameter-signature"> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div> <h4 class="tsd-returns-title">Returns <a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The filtered list, which is an instance of the DoublyLinkedList class.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:179</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="find" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>find</span><a href="#find" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="find.find-1"><span class="tsd-kind-call-signature">find</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#find.find-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The <code>find</code> function iterates through a linked list and returns the first element that satisfies a given condition.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span></h5> <div class="tsd-comment tsd-typography"><p>A function that takes a value of type T as its parameter and returns a boolean value. This function is used to determine whether a particular value in the linked list satisfies a certain condition.</p> </div> <div class="tsd-comment tsd-typography"></div> <ul class="tsd-parameters"> <li class="tsd-parameter-signature"> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>find</code> returns the first element in the linked list that satisfies the condition specified by the callback function. If no element satisfies the condition, it returns <code>null</code>.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:129</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="findLast" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>find<wbr/>Last</span><a href="#findLast" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="findLast.findLast-1"><span class="tsd-kind-call-signature">find<wbr/>Last</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#findLast.findLast-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The <code>findLast</code> function iterates through a linked list from the last node to the first node and returns the last value that satisfies the given callback function, or null if no value satisfies the callback.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span></h5> <div class="tsd-comment tsd-typography"><p>A function that takes a value of type T as its parameter and returns a boolean value. This function is used to determine whether a given value satisfies a certain condition.</p> </div> <div class="tsd-comment tsd-typography"></div> <ul class="tsd-parameters"> <li class="tsd-parameter-signature"> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>findLast</code> returns the last value in the linked list that satisfies the condition specified by the callback function. If no value satisfies the condition, it returns <code>null</code>.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:146</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="findNode" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>find<wbr/>Node</span><a href="#findNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="findNode.findNode-1"><span class="tsd-kind-call-signature">find<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#findNode.findNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The function <code>findNodeByValue</code> searches for a node with a specific value in a doubly linked list and returns the node if found, otherwise it returns null.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5> <div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter is the value that we want to search for in the doubly linked list.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The function <code>findNodeByValue</code> returns a <code>DoublyLinkedListNode&lt;T&gt;</code> if a node with the specified value <code>val</code> is found in the linked list. If no such node is found, it returns <code>null</code>.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:92</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="forEach" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>for<wbr/>Each</span><a href="#forEach" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="forEach.forEach-1"><span class="tsd-kind-call-signature">for<wbr/>Each</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#forEach.forEach-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The <code>forEach</code> function iterates over each element in a linked list and applies a callback function to each element.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></h5> <div class="tsd-comment tsd-typography"><p>The callback parameter is a function that takes two arguments: val and index. The val argument represents the value of the current node in the linked list, and the index argument represents the index of the current node in the linked list.</p> </div> <div class="tsd-comment tsd-typography"></div> <ul class="tsd-parameters"> <li class="tsd-parameter-signature"> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li> <li> <h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:162</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="getAt" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>get<wbr/>At</span><a href="#getAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="getAt.getAt-1"><span class="tsd-kind-call-signature">get<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#getAt.getAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The <code>getAt</code> function returns the value at a specified index in a linked list, or null if the index is out of bounds.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"><p>The index parameter is a number that represents the position of the element we want to retrieve from the list.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method is returning the value at the specified index in the linked list. If the index is out of bounds or the linked list is empty, it will return null.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:75</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="getNodeAt" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>get<wbr/>Node<wbr/>At</span><a href="#getNodeAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="getNodeAt.getNodeAt-1"><span class="tsd-kind-call-signature">get<wbr/>Node<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#getNodeAt.getNodeAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The function <code>getNodeAt</code> returns the node at a given index in a doubly linked list, or null if the index is out of range.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"><p>The <code>index</code> parameter is a number that represents the position of the node we want to retrieve from the doubly linked list. It indicates the zero-based index of the node we want to access.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The method <code>getNodeAt(index: number)</code> returns a <code>DoublyLinkedListNode&lt;T&gt;</code> object if the index is within the valid range of the linked list, otherwise it returns <code>null</code>.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:84</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="indexOf" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>index<wbr/>Of</span><a href="#indexOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="indexOf.indexOf-1"><span class="tsd-kind-call-signature">index<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#indexOf.indexOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-comment tsd-typography"><p>The function returns the index of the first occurrence of a given value in a linked list.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5> <div class="tsd-comment tsd-typography"><p>The parameter <code>val</code> is of type <code>T</code>, which means it can be any data type. It represents the value that we are searching for in the linked list.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The method <code>indexOf</code> returns the index of the first occurrence of the specified value <code>val</code> in the linked list. If the value is not found, it returns -1.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/linked-list/doubly-linked-list.d.ts:137</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-external"><a id="insertAfter" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>insert<wbr/>After</span><a href="#insertAfter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3> <ul class="tsd-signatures tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="insertAfter.insertAfter-1"><span class="tsd-kind-call-signature">insert<wbr/>After</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existingValueOrNode</span>, <span class="tsd-kind-parameter">newValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertAfter.insertAfter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li> <li class="tsd-description"> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list">