about | help | code help+videos | done | prefs |
encoder
Write a function that replaces the words in `raw` with the words in `code_words` such that the first occurrence of each word in `raw` is assigned the first unassigned word in `code_words`. encoder(["a"], ["1", "2", "3", "4"]) → ["1"] encoder(["a", "b"], ["1", "2", "3", "4"]) → ["1", "2"] encoder(["a", "b", "a"], ["1", "2", "3", "4"]) → ["1", "2", "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
Difficulty: 300
Copyright Nick Parlante 2017 - privacy