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

Day 14 - No need to drop sand from (500,0) #1

Open
itsCryne opened this issue Dec 14, 2022 · 0 comments
Open

Day 14 - No need to drop sand from (500,0) #1

itsCryne opened this issue Dec 14, 2022 · 0 comments
Labels
Performance - Time There is a faster way to solve this problem

Comments

@itsCryne
Copy link
Owner

Because falling sand does not alter the path until the point where it settles during step n, subsequent sand pieces will always take the same path until step n-1.
Thus, many steps can be saved by caching this position and "generating" sand there.

@itsCryne itsCryne added the Performance - Time There is a faster way to solve this problem label Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance - Time There is a faster way to solve this problem
Projects
None yet
Development

No branches or pull requests

1 participant