| about | help | code help+videos | done | prefs |
Sometimes you use a list to represent a set of items, but you really want to have no duplicates, and just to make things neater, put the items in sorted order. Implement the function unique(items), which takes a list of items and returns a new list which has one copy of each of the items, in sorted order. unique([1, 1, 2, 3]) → [1, 2, 3] unique([1, 1, 1, 2, 2, 1]) → [1, 2] unique([]) → [] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 99 Post-solution available
Copyright Nick Parlante 2017 - privacy