about | help | code help+videos | done | prefs |
Given an integer array representing pixel colors in the format of RGBRGBRGB... return the number of color changes while scanning the array from first to last. compress_numColorChanges([0, 0, 0, 0, 0, 0]) → 1 compress_numColorChanges([0, 0, 0, 1, 1, 1]) → 2 compress_numColorChanges([2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 1, 1, 1]) → 3 ...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