Skip to content

Commit

Permalink
interval cover simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
xtof-durr committed Mar 20, 2019
1 parent c159fbf commit e02b18b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
16 changes: 10 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@

# Changelog


## 1.3

- added LazySegmentTree
- added shortest_cycle
- functions and classes are now provided also directly by tryalgo without the need to specify the module
- Changed the web host of the documentation.
- Renamed eratosthene.py into primes.py. Added the Gries-Misra sieve in this file.
- Added a Graph class in the module graph, which allows accessing vertices by names instead of indices.
- Added LazySegmentTree
- Added shortest_cycle
- Functions and classes are now provided also directly by tryalgo without the need to specify the module

## 1.2

- added horn_sat
- added partition_refinement
- added left_right_inversions
- Added horn\_sat
- Added partition_refinement
- Added left\_right\_inversions
6 changes: 4 additions & 2 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ tryalgo/dilworth.py
tryalgo/dinic.py
tryalgo/dist_grid.py
tryalgo/edmonds_karp.py
tryalgo/eratosthene.py
tryalgo/eulerian_tour.py
tryalgo/fast_exponentiation.py
tryalgo/fenwick.py
Expand All @@ -30,7 +29,6 @@ tryalgo/ford_fulkerson.py
tryalgo/freivalds.py
tryalgo/gale_shapley.py
tryalgo/gauss_jordan.py
tryalgo/girth.py
tryalgo/graph.py
tryalgo/graph01.py
tryalgo/horn_sat.py
Expand Down Expand Up @@ -62,14 +60,18 @@ tryalgo/our_queue.py
tryalgo/partition_refinement.py
tryalgo/permutation_rank.py
tryalgo/polygon.py
tryalgo/pq_tree.py
tryalgo/predictive_text.py
tryalgo/primes.py
tryalgo/rabin_karp.py
tryalgo/range_minimum_query.py
tryalgo/rectangles_from_grid.py
tryalgo/rectangles_from_histogram.py
tryalgo/rectangles_from_points.py
tryalgo/roman_numbers.py
tryalgo/scalar.py
tryalgo/shortest_cycle.py
tryalgo/skip_list.py
tryalgo/strongly_connected_components.py
tryalgo/subsetsum.py
tryalgo/subsetsum_divide.py
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
author='Jill-Jênn Vie and Christoph Dürr',
author_email='christoph.durr@lip6.fr',
license='MIT',
url='http://pythonhosted.org/tryalgo/',
url='https://jilljenn.github.io/tryalgo/',
keywords='algorithms data-structures programming competition',
packages=['tryalgo'],
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion tryalgo/interval_cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def interval_cover(I):
:complexity: O(n log n)
"""
S = []
for start, end in sorted(I, key=lambda v: (v[1], v[0])):
for start, end in sorted(I, key=lambda v: v[1]):
if not S or S[-1] < start:
S.append(end)
return S
Expand Down

0 comments on commit e02b18b

Please sign in to comment.