Skip to content

Commit ffc6d75

Browse files
Revert "Removed \big calls"
This reverts commit 8e0780e.
1 parent 8e0780e commit ffc6d75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

OMSCS/Courses/GA/Practice Problems/6.2 - Hotel Stops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ So for each hotel $A_i$, you need to calculate the penalty of stopping at that h
7878
- Is there a risk with using a greedy algorithm? You want to travel exactly 200 miles in a day. Sometimes it might be worth stopping early for a larger penalty to avoid a bigger penalty later. Does the math check out? The penalty is the distance squared.
7979
- Making the algorithm $n^2$ seems to account for possible greediness.
8080

81-
$P(i)=min\{(200-A_i)^2,min\space\{P(j)+(200-A_i+A_j)^2:0 \le j \lt i\}\}$
81+
$P(i)=min\bigg\{(200-A_i)^2,min\space\Big\{P(j)+\big(200-A_i+A_j\big)^2:0 \le j \lt i\Big\}\bigg\}$
8282

8383
## Code
8484
```python

0 commit comments

Comments
 (0)