Skip to content

Commit 0046a7a

Browse files
committed
Light pass over chapter 7
1 parent b48b883 commit 0046a7a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

06_object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ class List {
623623
}
624624
625625
static fromArray(array) {
626-
let result = null
626+
let result = null;
627627
for (let i = array.length - 1; i >= 0; i--) {
628628
result = new this(array[i], result);
629629
}

07_robot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ The problem of finding a route through a ((graph)) is a typical _((search proble
308308

309309
The number of possible routes through a graph is infinite. But when searching for a route from _A_ to _B_, we are interested only in the ones that start at _A_. We also don't care about routes that visit the same place twice—those are definitely not the most efficient route anywhere. So that cuts down on the number of routes that the route finder has to consider.
310310

311-
In fact, we are mostly interested in the _shortest_ route. So we want to make sure we look at short routes before we look at longer ones. A good approach would be to "grow" routes from the starting point, exploring every reachable place that hasn't been visited yet, until a route reaches the goal. That way, we'll only explore routes that are potentially interesting, and we'll find the shortest route (or one of the shortest routes, if there are more than one) to the goal.
311+
In fact, we are mostly interested in the _shortest_ route. So we want to make sure we look at short routes before we look at longer ones. A good approach would be to "grow" routes from the starting point, exploring every reachable place that hasn't been visited yet, until a route reaches the goal. That way, we'll only explore routes that are potentially interesting, and we know that the first route we find is the shortest route (or one of the shortest routes, if there are more than one).
312312

313313
{{index "findRoute function"}}
314314

0 commit comments

Comments
 (0)