|
36 | 36 | * @param {Node} right Right sibling. |
37 | 37 | * @param {Node} parent Parent of the node. |
38 | 38 | */ |
39 | | - exports.Node = function(value, left, right, parent) { |
| 39 | + exports.Node = function (value, left, right, parent) { |
40 | 40 | /** |
41 | 41 | * @member {Number|String} |
42 | 42 | */ |
|
52 | 52 | * @public |
53 | 53 | * @constructor |
54 | 54 | */ |
55 | | - exports.BinaryTree = function() { |
| 55 | + exports.BinaryTree = function () { |
56 | 56 | this._root = null; |
57 | 57 | }; |
58 | 58 |
|
|
90 | 90 | * |
91 | 91 | * @private |
92 | 92 | * @param {Node} current Node from which to start the traversal. |
93 | | - * @param {Function} callback Callback which will be called |
94 | | - * for each traversed node. |
| 93 | + * @param {Function} callback Callback which |
| 94 | + * will be called for each traversed node. |
95 | 95 | */ |
96 | 96 | exports.BinaryTree.prototype._inorder = function (current, callback) { |
97 | 97 | if (!current) { |
|
121 | 121 | * |
122 | 122 | * @private |
123 | 123 | * @param {Node} current Node from which to start the traversal. |
124 | | - * @param {Function} callback Callback which will be called |
125 | | - * for each traversed node. |
| 124 | + * @param {Function} callback Callback which will |
| 125 | + * be called for each traversed node |
126 | 126 | */ |
127 | 127 | exports.BinaryTree.prototype._postorder = function (current, callback) { |
128 | 128 | if (!current) { |
|
167 | 167 |
|
168 | 168 | /** |
169 | 169 | * Pre-order preorder traversal of the whole tree. |
170 | | - * |
| 170 | + * |
171 | 171 | * @public |
172 | 172 | * @param {Function} callback Callback which will |
173 | 173 | * be called for each traversed node. |
|
222 | 222 | * @param {Node} newChild Child replacement. |
223 | 223 | */ |
224 | 224 | exports.BinaryTree.prototype._replaceChild = |
225 | | - function (parent, oldChild, newChild) { |
| 225 | + function (parent, oldChild, newChild) { |
226 | 226 | if (!parent) { |
227 | 227 | this._root = newChild; |
228 | 228 | this._root._parent = null; |
|
0 commit comments