00:01
In this problem, we want to start in any city and get to the other four cities using the least possible amount of money.
00:10
In order to do that here, we're going to have to go through this path and make choices about the least possible price for these tickets.
00:19
What i'm noticing here in this problem is that from san francisco to l .a.
00:24
Or from l .a.
00:24
To san francisco, because this is a directed path, is going to cost me $69.
00:29
That's the cheapest flight here.
00:32
So we either need to start in l .a.
00:34
And go to san francisco first or san francisco and go to l .a.
00:38
First.
00:38
So it doesn't matter here.
00:41
We're going to have to check both to see what would happen.
00:44
And as we get to each place, so we start in l .a.
00:48
L .a.
00:49
To san francisco starts or costs of $69.
00:53
And now that we're in san francisco, let's take the cheapest flight out of san francisco to the next town.
00:58
That would be $179 to denver.
01:03
So now we're in denver for $179...