about | help | code help+videos | done | prefs |
list_scaredyCat
Imagine you are given a list of pets that are following each other to a big pet party. IE: The pet at position 0 is following the pet at position 1. If the pet is a cat that is being followed by a dog, it gets scared and runs away, so you should remove it from the list! list_scaredyCat(["cat", "dog", "guinea pig"]) → ["cat", "dog", "guinea pig"] list_scaredyCat(["cat", "frog", "cat", "dog", "cat"]) → ["cat", "frog", "cat", "dog"] list_scaredyCat(["cat", "dog", "cat", "cat", "snake"]) → ["cat", "dog", "snake"] ...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