Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo p.161 #23

Closed
Junyeopp opened this issue Aug 27, 2020 · 1 comment
Closed

typo p.161 #23

Junyeopp opened this issue Aug 27, 2020 · 1 comment

Comments

@Junyeopp
Copy link

p.161 슬라이딩 윈도우가 우측으로 이동하는 코드에서 expand(s, i , i + 1)로 표기되어 있습니다.
반면에 전체코드에서는 expand(i, i + 1)로 표기되어 있습니다.

expand가 정의된 것을 보면 expand(i, i + 1)이 맞는 것으로 보입니다. 감사합니다.

@likejazz
Copy link
Collaborator

likejazz commented Aug 28, 2020

말씀하신대로 p161에서 조각 코드 또한 다음과 같이 수정되는게 맞겠습니다.

for i in range(0, len(s) - 1):
    result = max(result,
                 expand(i, i + 1), 
                 expand(i, i + 2), 
                 key=len)
return result

정오표에 반영하겠습니다.
알려주셔서 감사합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants