sw17ch / data-clist

A purely functional ring data structure for Haskell.
Other
8 stars 9 forks source link

State asymptotic running times #7

Open noinia opened 9 years ago

noinia commented 9 years ago

It would be great if you could mention asymptotic running times. I briefly scanned through the code, seems like most should be what you expect, (i.e. O(1) amortized for a single rotate/insert) or O(n) for full traversels. The only exceptions are removeL and removeR, Alternatingly calling removeL and removeR looks like that is going to be expensive (i.e. linear time per operation)?

jeremyjh commented 8 years ago

Sorry I never responded, I would take a PR for this.