Skip to content

Commit e744206

Browse files
authored
Update minimum-moves-to-move-a-box-to-their-target-location.py
1 parent 5baf8f3 commit e744206

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/minimum-moves-to-move-a-box-to-their-target-location.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def g(p1, p2):
3636
return abs(p1[0]-p2[0])+abs(p1[1]-p2[1])
3737

3838
def a_star(b, p, t):
39-
f, h = g(b, t), 2
39+
f, dh = g(b, t), 2
4040
closer, detour = [(b, p)], []
4141
lookup = set()
4242
while closer or detour:
4343
if not closer:
44-
f += h
44+
f += dh
4545
closer, detour = detour, closer
4646
b, p = closer.pop()
4747
if b == t:

0 commit comments

Comments
 (0)