about | help | code help+videos | done | prefs |
Given an array of colors in the format of R,G,B,R,G,B,R,G,B... compress it using run length encoding so that it is changed to repeat,R,G,B,repeat,R,G,B,... and return the compressed array. compress_colorArray([0, 0, 0]) → [1, 0, 0, 0] compress_colorArray([0, 0, 0, 0, 0, 0]) → [2, 0, 0, 0] compress_colorArray([0, 0, 0, 1, 1, 1]) → [1, 0, 0, 0, 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