UNPKG

avl-tree-typed

Version:
422 lines (412 loc) 232 kB
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AVLTree | avl-tree-typed</title><meta name="description" content="Documentation for avl-tree-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">avl-tree-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">avl-tree-typed</a></li> <li><a href="AVLTree.html">AVLTree</a></li></ul> <h1>Class AVLTree&lt;N&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">N</span><span class="tsd-signature-symbol"> extends </span><a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span> = <a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a></h4></li></ul></section> <section class="tsd-panel tsd-hierarchy"> <h4>Hierarchy</h4> <ul class="tsd-hierarchy"> <li><span class="tsd-signature-type ">BST</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span> <ul class="tsd-hierarchy"> <li><span class="target">AVLTree</span></li></ul></li></ul></section> <section class="tsd-panel"> <h4>Implements</h4> <ul class="tsd-hierarchy"> <li><span class="tsd-signature-type ">IAVLTree</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span></li></ul></section><aside class="tsd-sources"> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/avl-tree.d.ts:14</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="AVLTree.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="AVLTree.html#_comparator" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_comparator</span></a> </div></section> <section class="tsd-index-section"> <h3 class="tsd-index-heading">Accessors</h3> <div class="tsd-index-list"><a href="AVLTree.html#loopType" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>loop<wbr/>Type</span></a> <a href="AVLTree.html#root" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>root</span></a> <a href="AVLTree.html#size" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>size</span></a> <a href="AVLTree.html#visitedId" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Id</span></a> <a href="AVLTree.html#visitedLeftSum" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Left<wbr/>Sum</span></a> <a href="AVLTree.html#visitedNode" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Node</span></a> <a href="AVLTree.html#visitedVal" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Val</span></a> </div></section> <section class="tsd-index-section"> <h3 class="tsd-index-heading">Methods</h3> <div class="tsd-index-list"><a href="AVLTree.html#BFS" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>BFS</span></a> <a href="AVLTree.html#DFS" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFS</span></a> <a href="AVLTree.html#DFSIterative" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFSIterative</span></a> <a href="AVLTree.html#_accumulatedByPropertyName" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span></a> <a href="AVLTree.html#_addTo" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_add<wbr/>To</span></a> <a href="AVLTree.html#_balanceFactor" class="tsd-index-link tsd-is-protected tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_balance<wbr/>Factor</span></a> <a href="AVLTree.html#_balanceLL" class="tsd-index-link tsd-is-protected tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_balanceLL</span></a> <a href="AVLTree.html#_balanceLR" class="tsd-index-link tsd-is-protected tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_balanceLR</span></a> <a href="AVLTree.html#_balancePath" class="tsd-index-link tsd-is-protected tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_balance<wbr/>Path</span></a> <a href="AVLTree.html#_balanceRL" class="tsd-index-link tsd-is-protected tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_balanceRL</span></a> <a href="AVLTree.html#_balanceRR" class="tsd-index-link tsd-is-protected tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_balanceRR</span></a> <a href="AVLTree.html#_clearResults" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_clear<wbr/>Results</span></a> <a href="AVLTree.html#_compare" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a> <a href="AVLTree.html#_getResultByPropertyName" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span></a> <a href="AVLTree.html#_pushByPropertyNameStopOrNot" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span></a> <a href="AVLTree.html#_setLoopType" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Loop<wbr/>Type</span></a> <a href="AVLTree.html#_setRoot" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Root</span></a> <a href="AVLTree.html#_setSize" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Size</span></a> <a href="AVLTree.html#_setVisitedId" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Id</span></a> <a href="AVLTree.html#_setVisitedLeftSum" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span></a> <a href="AVLTree.html#_setVisitedNode" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Node</span></a> <a href="AVLTree.html#_setVisitedVal" class="tsd-index-link tsd-is-protected tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Val</span></a> <a href="AVLTree.html#_updateHeight" class="tsd-index-link tsd-is-protected tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_update<wbr/>Height</span></a> <a href="AVLTree.html#add" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a> <a href="AVLTree.html#addMany" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a> <a href="AVLTree.html#allGreaterNodesAdd" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span></a> <a href="AVLTree.html#clear" class="tsd-index-link tsd-is-inherited 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="AVLTree.html#createNode" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Node</span></a> <a href="AVLTree.html#fill" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>fill</span></a> <a href="AVLTree.html#get" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a> <a href="AVLTree.html#getDepth" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Depth</span></a> <a href="AVLTree.html#getHeight" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Height</span></a> <a href="AVLTree.html#getLeftMost" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Left<wbr/>Most</span></a> <a href="AVLTree.html#getMinHeight" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Min<wbr/>Height</span></a> <a href="AVLTree.html#getNodes" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Nodes</span></a> <a href="AVLTree.html#getPathToRoot" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Path<wbr/>To<wbr/>Root</span></a> <a href="AVLTree.html#getPredecessor" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Predecessor</span></a> <a href="AVLTree.html#getRightMost" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Right<wbr/>Most</span></a> <a href="AVLTree.html#getSubTreeSize" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size</span></a> <a href="AVLTree.html#has" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has</span></a> <a href="AVLTree.html#isAVLBalanced" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isAVLBalanced</span></a> <a href="AVLTree.html#isBST" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBST</span></a> <a href="AVLTree.html#isEmpty" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a> <a href="AVLTree.html#isPerfectlyBalanced" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Perfectly<wbr/>Balanced</span></a> <a href="AVLTree.html#isSubtreeBST" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>SubtreeBST</span></a> <a href="AVLTree.html#lastKey" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>last<wbr/>Key</span></a> <a href="AVLTree.html#lesserSum" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>lesser<wbr/>Sum</span></a> <a href="AVLTree.html#levelIterative" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>level<wbr/>Iterative</span></a> <a href="AVLTree.html#listLevels" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>list<wbr/>Levels</span></a> <a href="AVLTree.html#morris" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>morris</span></a> <a href="AVLTree.html#perfectlyBalance" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>perfectly<wbr/>Balance</span></a> <a href="AVLTree.html#remove" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove</span></a> <a href="AVLTree.html#subTreeAdd" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Add</span></a> <a href="AVLTree.html#subTreeSum" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Sum</span></a> <a href="AVLTree.html#swapLocation" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>swap<wbr/>Location</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_AVLTree"><span class="tsd-kind-constructor-signature">new AVLTree</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span><a href="#constructor.new_AVLTree" 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>This is a constructor function for an AVL tree data structure in TypeScript.</p> </div> <section class="tsd-panel"> <h4>Type Parameters</h4> <ul class="tsd-type-parameter-list"> <li> <h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span> = <a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type ">AVLTreeNodeNested</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-type ">AVLTreeOptions</span></h5> <div class="tsd-comment tsd-typography"><p>The <code>options</code> parameter is an optional object that can be passed to the constructor of the AVLTree class. It allows you to customize the behavior of the AVL tree by providing different options.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span></h4> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Overrides BST&lt;N&gt;.constructor</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/avl-tree.d.ts:21</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-protected tsd-is-inherited tsd-is-external"><a id="_comparator" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_comparator</span><a href="#_comparator" 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">_comparator</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">BSTComparator</span></div><aside class="tsd-sources"> <p>Inherited from BST._comparator</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/bst.d.ts:123</li></ul></aside></section></section> <section class="tsd-panel-group tsd-member-group"> <h2>Accessors</h2> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="loopType" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>loop<wbr/>Type</span><a href="#loopType" 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-inherited tsd-is-external"> <li class="tsd-signature" id="loopType.loopType-1"><span class="tsd-signature-symbol">get</span> loopType<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">LoopType</span></li> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">LoopType</span></h4><aside class="tsd-sources"> <p>Implementation of IAVLTree.loopType</p> <p>Inherited from BST.loopType</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:56</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="root" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>root</span><a href="#root" 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-inherited tsd-is-external"> <li class="tsd-signature" id="root.root-1"><span class="tsd-signature-symbol">get</span> root<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><span class="tsd-signature-type tsd-kind-type-parameter">N</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><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><aside class="tsd-sources"> <p>Implementation of IAVLTree.root</p> <p>Inherited from BST.root</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:52</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="size" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>size</span><a href="#size" 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-inherited tsd-is-external"> <li class="tsd-signature" id="size.size-1"><span class="tsd-signature-symbol">get</span> size<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"> <p>Implementation of IAVLTree.size</p> <p>Inherited from BST.size</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:54</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="visitedId" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>visited<wbr/>Id</span><a href="#visitedId" 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-inherited tsd-is-external"> <li class="tsd-signature" id="visitedId.visitedId-1"><span class="tsd-signature-symbol">get</span> visitedId<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><span class="tsd-signature-symbol">[]</span></li> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"> <p>Implementation of IAVLTree.visitedId</p> <p>Inherited from BST.visitedId</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:58</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="visitedLeftSum" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>visited<wbr/>Left<wbr/>Sum</span><a href="#visitedLeftSum" 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-inherited tsd-is-external"> <li class="tsd-signature" id="visitedLeftSum.visitedLeftSum-1"><span class="tsd-signature-symbol">get</span> visitedLeftSum<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><span class="tsd-signature-symbol">[]</span></li> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"> <p>Implementation of IAVLTree.visitedLeftSum</p> <p>Inherited from BST.visitedLeftSum</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:64</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="visitedNode" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>visited<wbr/>Node</span><a href="#visitedNode" 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-inherited tsd-is-external"> <li class="tsd-signature" id="visitedNode.visitedNode-1"><span class="tsd-signature-symbol">get</span> visitedNode<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></li> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"> <p>Implementation of IAVLTree.visitedNode</p> <p>Inherited from BST.visitedNode</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:62</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="visitedVal" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>visited<wbr/>Val</span><a href="#visitedVal" 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-inherited tsd-is-external"> <li class="tsd-signature" id="visitedVal.visitedVal-1"><span class="tsd-signature-symbol">get</span> visitedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></li> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"> <p>Implementation of IAVLTree.visitedVal</p> <p>Inherited from BST.visitedVal</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:60</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-inherited tsd-is-external"><a id="BFS" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>BFS</span><a href="#BFS" 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-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="BFS.BFS-1"><span class="tsd-kind-call-signature">BFS</span><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><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-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>Performs a breadth-first search (BFS) on a binary tree, accumulating properties of each node based on their &#39;id&#39; property.</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of binary tree node IDs.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Implementation of IAVLTree.BFS</p> <p>Inherited from BST.BFS</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:287</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="BFS.BFS-2"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-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-comment tsd-typography"><p>Performs a breadth-first search (BFS) on a binary tree, accumulating properties of each node based on the specified property name.</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">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5> <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</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><span class="tsd-signature-symbol">[]</span></h4><p>An array of values corresponding to the specified property.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Implementation of IAVLTree.BFS</p> <p>Inherited from BST.BFS</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:293</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="BFS.BFS-3"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-3" 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>Performs a breadth-first search (BFS) on a binary tree, accumulating the &#39;val&#39; property of each node.</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">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5> <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of &#39;val&#39; properties from each node.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Implementation of IAVLTree.BFS</p> <p>Inherited from BST.BFS</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:299</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="BFS.BFS-4"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-4" 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>Performs a breadth-first search (BFS) on a binary tree, accumulating nodes themselves.</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">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5> <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of binary tree nodes.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Implementation of IAVLTree.BFS</p> <p>Inherited from BST.BFS</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:305</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="DFS" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>DFS</span><a href="#DFS" 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-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="DFS.DFS-1"><span class="tsd-kind-call-signature">DFS</span><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><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-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>Performs a depth-first search (DFS) traversal on a binary tree and accumulates properties of each node based on their &#39;id&#39; property.</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of binary tree node IDs.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Implementation of IAVLTree.DFS</p> <p>Inherited from BST.DFS</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:310</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="DFS.DFS-2"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><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><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-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-comment tsd-typography"><p>Performs a depth-first search (DFS) traversal on a binary tree and accumulates properties of each node based on the specified property name.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5> <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p> </div> <div class="tsd-comment tsd-typography"></div></li> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5> <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</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><span class="tsd-signature-symbol">[]</span></h4><p>An array of values corresponding to the specified property.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Implementation of IAVLTree.DFS</p> <p>Inherited from BST.DFS</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:317</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="DFS.DFS-3"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-3" 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>Performs a depth-first search (DFS) traversal on a binary tree and accumulates the &#39;val&#39; property of each node.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5> <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p> </div> <div class="tsd-comment tsd-typography"></div></li> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5> <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of &#39;val&#39; properties from each node.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Implementation of IAVLTree.DFS</p> <p>Inherited from BST.DFS</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:324</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="DFS.DFS-4"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-4" 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>Performs a depth-first search (DFS) traversal on a binary tree and accumulates nodes themselves.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5> <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p> </div> <div class="tsd-comment tsd-typography"></div></li> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5> <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p> </div> <div class="tsd-comment tsd-typography"></div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of binary tree nodes.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Implementation of IAVLTree.DFS</p> <p>Inherited from BST.DFS</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:331</li></ul></aside></li></ul></section> <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="DFSIterative" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>DFSIterative</span><a href="#DFSIterative" 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-inherited tsd-is-external"> <li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-1"><span class="tsd-kind-call-signature">DFSIterative</span><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><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-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>Performs an iterative depth-first search (DFS) traversal on a binary tree and accumulates properties of each node based on their &#39;id&#39; property.</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of binary tree node IDs.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Implementation of IAVLTree.DFSIterative</p> <p>Inherited from BST.DFSIterative</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:336</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-2"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><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><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-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-comment tsd-typography"><p>Performs an iterative depth-first search (DFS) traversal on a binary tree and accumulates properties of each node based on the specified property name.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5> <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p> </div> <div class="tsd-comment tsd-typography"></div></li> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5> <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</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><span class="tsd-signature-symbol">[]</span></h4><p>An array of values corresponding to the specified property.</p> <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"> <p>Implementation of IAVLTree.DFSIterative</p> <p>Inherited from BST.DFSIterative</p> <ul> <li>Defined in node_modules/data-structure-typed/lib/data-structures/binary-tree/abstract-binary-tree.d.ts:343</li></ul></aside></li> <li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-3"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrProperty