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

sorting capabilities #31

Merged
merged 3 commits into from
Apr 2, 2018
Merged

sorting capabilities #31

merged 3 commits into from
Apr 2, 2018

Conversation

yerden
Copy link
Contributor

@yerden yerden commented Mar 22, 2018

This series of commits adds sorting capabilities for Collection-derived classes.

Major changes:

  • add removeBatch() method to Lang/Array;
  • add SortComparer class which inherits EqualityComparer class and implements sorting elements;
  • add Collection/SortedArray implementation.

Hint: SortComparer class can be useful for implementing red-black trees, heaps etc.

yerden added 3 commits March 22, 2018 17:31
New method allows to remove several indices in a row.
New class allows to perform sorting on arrays with regard to element precedence.
New SortedArray heir of Collection class provides sorted array
implementation with standardized interface.

Methods utilize binary search which makes this collection more efficient
in some circumstances.

Possible applications may include percentile computations,
orders manipulation and so on.
@dingmaotu dingmaotu merged commit 897edfd into dingmaotu:master Apr 2, 2018
@yerden yerden deleted the sortedarray branch April 2, 2018 16:42
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