Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
iezer committed May 28, 2019
1 parent 38a3822 commit 7bbb01e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cpp/hello_world/src/ArraySort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ class ArraySort {
int p = (left + right) / 2;
int value = array[p];

while(left < right) {
// 10
// 1, 2, 15, 16, 10, 4, 5, 10, 20, 3
// 1, 2, 3, 10, 5, 4, 10, 16, 20, 15
while(left <= right) {
while (array[left] < value) {
left++;
}
Expand Down
4 changes: 2 additions & 2 deletions javascript/2019/avlTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class AVLTree {
node.left = oldChild;
newRoot.right = node;
node.updateHeight();
newRoot.updateHeight()
newRoot.updateHeight();
return newRoot;
}
leftRotation(node) {
Expand All @@ -57,7 +57,7 @@ class AVLTree {
node.right = oldChild;
newRoot.left = node;
node.updateHeight();
newRoot.updateHeight()
newRoot.updateHeight();
return newRoot;
}
balance(root, value) {
Expand Down

0 comments on commit 7bbb01e

Please sign in to comment.