-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
combine_notes_cat_sort_uniq(): sort and dedup lines all at once
Instead of reading lines one by one and insertion-sorting them into a string_list, read all of the lines, sort them, then remove duplicates. Aside from being less code, this reduces the complexity from O(N^2) to O(N lg N) in the total number of lines. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Jeff King <peff@peff.net>
- Loading branch information
Michael Haggerty
authored and
Jeff King
committed
Nov 8, 2012
1 parent
f992f0c
commit 1313524
Showing
1 changed file
with
16 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters