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

Chapter 6.1 error? #287

Open
tlent opened this issue Nov 7, 2023 · 0 comments
Open

Chapter 6.1 error? #287

tlent opened this issue Nov 7, 2023 · 0 comments

Comments

@tlent
Copy link

tlent commented Nov 7, 2023

Chapter 6.1 says:

It turns out that only one inversion of push and pop works with this. To invert pop we would have to move the "tail" pointer backwards, but because our list is singly-linked, we can't do that efficiently. If we instead invert push we only have to move the "head" pointer forward, which is easy.

I believe the last sentence should say move the "tail" pointer forward. Moving the head pointer forward would not make sense as part of a push operation. The code that follows moves the tail pointer forward, not the head pointer.

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

1 participant