about | help | code help+videos | done | prefs |
stripList
Given a data list, and a list of elements that are to be removed, modify the data list as follows: Remove all elements at the start of the list that are contained in the thingsToRemove up until the first(leftmost) element that is not contained in the list. Then repeat for all elements at the end of the list, stopping at the rightmost element that does not meet the removal criteria. stripList([1, 1, 1, 5, 4, 1, 1, 1], [1]) → [5, 4] stripList([1, 1, 1, 4, 1, 1, 1], [1]) → [4] stripList([1, 1, 1, 1, 1, 1], [1]) → [] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy