* @return {SplayTreeNode} Node having the maximum key value.
(opt_startNode)
| 143 | * @return {SplayTreeNode} Node having the maximum key value. |
| 144 | */ |
| 145 | findMax(opt_startNode) { |
| 146 | if (this.isEmpty()) return null; |
| 147 | let current = opt_startNode || this.root_; |
| 148 | while (current.right !== null) { |
| 149 | current = current.right; |
| 150 | } |
| 151 | return current; |
| 152 | } |
| 153 | |
| 154 | /** |
| 155 | * @return {SplayTreeNode} Node having the maximum key value that |
no test coverage detected