HP49-HP50 : when {list of repeated solutions} —> {list with no rep. sol}
|
12-21-2022, 05:03 PM
Post: #4
|
|||
|
|||
RE: HP49-HP50 : when {list of repeated solutions} —> {list with no rep. sol}
Here's another solution using SORT and STREAM. You have to use it after converting the list items to strings because you can't sort a list of arrays. This should be faster O(n*log(n)) than Werner's (O(n2))when the input is large.
Half the code is devoted to converting the results from individual items on the stack back into a list. Maybe there's an easier way that's still fast. Code: « DEPTH → D |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)