All problems
Rainbow Component Count
Problem
Count how many Rainbow components are enabled versus missing from a boolean list. Return [enabled, missing]; an empty list gives [0, 0].
Hint
Rainbow combines double Q-learning, dueling, PER, n-step, distributional, and noisy nets.
Test cases
case 1
in: [[true,true,true,true,true,true,true]]
expected: [7,0]
case 2
in: [[true,false,true,false,true,false,true]]
expected: [4,3]
case 3
in: [[]]
expected: [0,0]
Starter codePython
def rainbow_component_count(components):
# Your code here
pass3 test cases · run your code against them in the editor