gribozavr
(Dmitri Gribenko)
December 18, 2015, 10:09am
1
Hi,
The standard library should provide a stable sort. This needs a
proposal to swift-evolution (the design should be trivial, new methods
should mirror existing sorting APIs), and implementation. The
standard library already contains an internal implementation of
insertion sort, so implementing this should amount to providing public
entry points and writing tests.
opened 10:06AM - 18 Dec 15 UTC
Improvement
StarterBug
Standard Library
NewAPIRequest
StarterProposal
| | |
|------------------|-----------------|…
|Previous ID | SR-306 |
|Radar | rdar://problem/18221680 |
|Original Reporter | @gribozavr |
|Type | Improvement |
<details>
<summary>Additional Detail from JIRA</summary>
| | |
|------------------|-----------------|
|Votes | 5 |
|Component/s | Standard Library |
|Labels | Improvement, NewAPIRequest, StarterBug, StarterProposal |
|Assignee | None |
|Priority | Medium |
md5: 37f09a79466d145bd076877be8089150
</details>
**Issue Description:**
The standard library should provide a stable sorting algorithm, next to the regular, unstable, sort() and sortInPlace().
This needs a proposal to swift-evolution (the design should be trivial, new methods should mirror existing sorting APIs), and implementation. The standard library already contains an internal implementation of insertion sort, so implementing this should amount to providing public entry points and writing tests.
Dmitri
···
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/