Comments (4)
Here is an issue for your feature request: #7. Thank you!
from algorithm.
The SortedDictionary is sorted by its key value. So if you want to access it in descending order, you can access it backwards. For example:
let n = dict.count
for i in 1..<n {
let e = dict[n - i]
// do something with `e`
}
Something like that should work. If you need, please reopen the issue. All the best!
from algorithm.
Yes, I use SortedDictionary.reversed() to get an array of tuple..but i wanna reduce my algorithm complexity, trying to perform only one iteration. It could be useful implementing a custom comparable closure, like TreeMap in Java.
from algorithm.
That is a good idea, I will look into that.
from algorithm.
Related Issues (7)
- Update Algorithm `lhs` and `rhs` references to `left` and `right`, relatively.
- Update code documentation comments to the newer style HOT 1
- Discussion about dropping some collections HOT 2
- Release Algorithm 2 with Swift 3 support.
- Add custom compare function to data structures. HOT 1
- Xcode 9 build failures HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from algorithm.