Znajdź zakresy wartości True na liście
Wyzwanie: Napisz funkcję lub program, który akceptuje listę wartości boolowskich i zwraca wszystkie zakresy wartości True. Przypadki testowe: f [F] = [] f [T] = [[0,0]] f [T,T,F,T] = [[0,1],[3,3]] f [F,T,T,F,F,T,T,T] = [[1,2],[5,7]] f [F,T,T,F,F,F,T,T,T,T] = [[1,2],[6,9]] f [T,T,F,F,F,T,T,T,T,T,T,T,T,T,T,F] = [[0,1],[5,14]] f [F,F,T,T,F,F,F,F,F,F,F,F,T,T,T,T,T,T,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,T] = [[2,3],[12,19],[33,54],[93,94]] Zasady: Możesz wybrać sposób …