Skip to content

Commit 2b16896

Browse files
committed
Fix indentation
1 parent 2f80d34 commit 2b16896

4 files changed

Lines changed: 10 additions & 35 deletions

File tree

‎src/combinatorics/permutations.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
}
2323

24-
/**
24+
/**
2525
* Finds all the permutations of given array.<br><br>
2626
* Permutation relates to the act of rearranging, or permuting,
2727
* all the members of a set into some sequence or order.

‎src/data-structures/suffix-tree.js‎

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -66,31 +66,6 @@
6666
}
6767
};
6868

69-
// function isSubstr(tree, str) {
70-
// if (!tree) {
71-
// return false;
72-
// }
73-
// if (tree.nodes[str[0]]) {
74-
// return isSubstr(tree, str.substr(1, str.length));
75-
// }
76-
// var match = '';
77-
// for (var i = 0; i < Math.min(tree.value.length, str.length); i += 1) {
78-
// if (tree.value[i] === str[i]) {
79-
// match += str[i];
80-
// } else {
81-
// break;
82-
// }
83-
// }
84-
// if (match.length === str.length) {
85-
// return true;
86-
// }
87-
// return false;
88-
// }
89-
90-
// var suffix = new SuffixTree();
91-
// suffix.build('banana');
92-
// console.log(suffix);
93-
9469
exports.Node = Node;
9570
exports.SuffixTree = SuffixTree;
9671

‎src/searching/longest-increasing-subsequence.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
exports.longestSubsequence = (function () {
55

6-
/**
6+
/**
77
* Find the index of the first largest element in array.
88
* Complexity: O(N).
99
*
@@ -29,15 +29,15 @@
2929
return maxIdx;
3030
}
3131

32-
/**
32+
/**
3333
* Default comparison method.
3434
* @private
3535
*/
3636
function cmp(a, b) {
3737
return a.distance - b.distance;
3838
}
3939

40-
/**
40+
/**
4141
* Creates directed graph from given array.
4242
* Each element's neighbours are the elements which can be
4343
* after the element in the resulting sequence.<br><br>
@@ -59,7 +59,7 @@
5959
return result;
6060
}
6161

62-
/**
62+
/**
6363
* Finds the longest sub-sequence for given node.<br><br>
6464
* Complexity: O(N^N).
6565
* @private
@@ -98,7 +98,7 @@
9898
return result;
9999
}
100100

101-
/**
101+
/**
102102
* Algorithm from dynamic programming. It finds the longest
103103
* sub-sequence of increasing numbers. It is not required
104104
* the numbers to be neighboring. For example for 1, 5, 2

‎src/sets/weightquickunion.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
(function (exports) {
2929
'use strict';
3030

31-
/**
31+
/**
3232
* Initialization.<br><br>
3333
* Time complexity: O(N).
3434
*
@@ -45,7 +45,7 @@
4545
}
4646
};
4747

48-
/**
48+
/**
4949
* Finds the root of given node.<br><br>
5050
* Time complexity: O(log N).
5151
* @private
@@ -60,7 +60,7 @@
6060
return i;
6161
};
6262

63-
/**
63+
/**
6464
* Checks whether two nodes are connected.<br><br>
6565
* Time complexity: O(log N).
6666
*
@@ -72,7 +72,7 @@
7272
return this._root(p) === this._root(q);
7373
};
7474

75-
/**
75+
/**
7676
* Connects two nodes - p and q.<br><br>
7777
* Time complexity: O(log N).
7878
*

0 commit comments

Comments
 (0)