Little problem(s) July 2022
|
07-05-2022, 04:28 PM
Post: #11
|
|||
|
|||
RE: Little problem(s) July 2022
(07-05-2022 02:03 PM)John Keith Wrote: Very nice program, as usual. Thank you! Quote:This is not really an improvement, but I couldn't resist a functional version of your program for the 48G You should know by now that I prefer functional programming. It's really a very nice solution. Quote:As an addendum to your addendum, your program is technically O(n^2) but since built-in functions like POS are many times faster than any UserRPL equivalent, it comes out much closer to O(n) in practice. This reminds me of Clojure’s persistent vectors, which gives practically O(1) runtime for appends, updates, lookups and subvec. Because each node has 32 leaves, the tree becomes very flat. Thus, access is constant for most practical use cases. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)