Fixed linked list bug (#2481)

* * fixed __getitem__() function
* add test

* * updated doctests
* updated __setitem__() func

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Du Yuanchao
2020-09-26 00:08:57 +08:00
committed by GitHub
parent 18f1dcd48a
commit b81fcef66b
2 changed files with 48 additions and 10 deletions

View File

@ -1,4 +1,5 @@
from __future__ import annotations
import math
""" Minimax helps to achieve maximum score in a game by checking all possible moves
@ -10,8 +11,9 @@ import math
"""
def minimax(depth: int, node_index: int, is_max: bool,
scores: list[int], height: float) -> int:
def minimax(
depth: int, node_index: int, is_max: bool, scores: list[int], height: float
) -> int:
"""
>>> import math
>>> scores = [90, 23, 6, 33, 21, 65, 123, 34423]