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 17 #4

Open
annakrystalli opened this issue Jan 9, 2018 · 2 comments
Open

Day 17 #4

annakrystalli opened this issue Jan 9, 2018 · 2 comments

Comments

@annakrystalli
Copy link
Owner

No description provided.

@annakrystalli
Copy link
Owner Author

TJ Mahr [12 minutes ago]
For spinlock, the value 0 is always the first element in the vector

TJ Mahr [7 minutes ago]
So you need to keep track of whenever the item in position 2 changes, not the whole vector. You can determine the next insertion position using math alone. To derive the equation, make a table with the current position, offset, length and new position and figure out the pattern 🙂

@annakrystalli
Copy link
Owner Author

😃 of course! That's awesome! thanks!

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

No branches or pull requests

1 participant