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

Efficiency improvement for insert_at when repositioning an existing item #27

Merged
merged 1 commit into from
Feb 24, 2012

Conversation

bradediger
Copy link
Contributor

Previously, repositioning an item already in the list required two moves proportional to the total number of items in the list: one to remove the existing item and another to reinsert it. This commit changes the behavior so that only items between the old and new position are renumbered.

Previously, repositioning an item already in the list required two
moves proportional to the total number of items in the list: one to
remove the existing item and another to reinsert it. This commit changes
the behavior so that only items between the old and new position are
renumbered.
swanandp added a commit that referenced this pull request Feb 24, 2012
Efficiency improvement for insert_at when repositioning an existing item
@swanandp swanandp merged commit 1e976e5 into brendon:master Feb 24, 2012
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

Successfully merging this pull request may close these issues.

2 participants