Closed AlyceOsbourne closed 1 year ago
this is sorta a concrete impl of dales suggestion, with the segments part implemented Also, after testing I can conclude that the insertion method is insertion method is much, much slower, so much so I wouldn't consider it to be a good choice
Thanks for the contribution! My next session will focus on this transformation and pay attention to the above.
See issue #3
In this first example, we reverse the range created, this is cheaper than reversing the created list, as its lazy. I might consider making this a generator that yields List[Any], this is as simple as replacing
return
withyield from
orNow, if I am remembering correctly, insert 0 has a high cost, dues to it being O(n) time, so, while this implementation will work, I think it will be slower than the above operation