Skip to content

Commit 7651b8b

Browse files
committed
modifying JSDOCS at BinaryLifting file at Graphs Folder
1 parent 8aab6f9 commit 7651b8b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: Graphs/BinaryLifting.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/**
22
* Author: Adrito Mukherjee
3+
* @class BinaryLifting
34
* Binary Lifting implementation in Javascript
4-
* Binary Lifting is a technique that is used to find the kth ancestor of a node in a rooted tree with N nodes
5+
* @classdesc Binary Lifting is a technique that is used to find the kth ancestor of a node in a rooted tree with N nodes
56
* The technique requires preprocessing the tree in O(N log N) using dynamic programming
67
* The technique can answer Q queries about kth ancestor of any node in O(Q log N)
78
* It is faster than the naive algorithm that answers Q queries with complexity O(Q K)
@@ -10,6 +11,12 @@
1011
*/
1112

1213
export class BinaryLifting {
14+
/**
15+
* Creates an instance of BinaryLifting.
16+
* @template T
17+
* @param {T} root
18+
* @param {Array<[T, T]>} tree - The edges of the tree represented as an array of pairs.
19+
*/
1320
constructor(root, tree) {
1421
this.root = root
1522
this.connections = new Map()

0 commit comments

Comments
 (0)