Skip to content

Commit 73e120c

Browse files
committed
Updates README and fixes bug in gcf
1 parent ad54b08 commit 73e120c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ There are 12 problems as of 7/18. Solution branch will appear on 7/22.
1818

1919
If you are attending the in person session, please also have this tab open:
2020
[Understanding Check](https://pollev.com/bigcavern281)
21+
22+
[Slides from Review Session](http://slides.com/bethjohnson/algorithmic-complexityreview-3-4/)

algo-time-complexity-review.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function gcf(num1, num2){
5555
if (num1 > num2){ //this ensures num1 is the smaller number
5656
var temp = num1;
5757
num1 = num2;
58-
num2 = num1;
58+
num2 = temp;
5959
}
6060
for (var i = num1; i > 1; i--){
6161
if (num1 % i === 0 && num2 % i === 0){
@@ -170,7 +170,7 @@ function findColor(quadTree, coordinates){
170170
if (!Array.isArray(quadTree.color)){
171171
return quadTree.color;
172172
} else {
173-
var quadrant = findQuadrant(quadTree, coordinates);
173+
var quadrant = findQuadrant(quadTree, coordinates);
174174
if (quadrant === "NE") {
175175
return findColor(quadTree.color[0], coordinates);
176176
}

0 commit comments

Comments
 (0)