Relative Content

Tag Archive for pythoncounting

Where does my code fail? Longest sequence of alternating 0’s and 1’s

In an online exam for a programming job, I was asked to code, in python, a function that would receive an input list containing a sequence of 0’s and 1’s. The list always has at least one element, and it’s guaranteed that the elements are all 0’s and ‘1s. The function needs to find the longest subsequence of alternating 0’s and 1’s

Where does my code fail? Longest sequence of alternating 0’s and 1’s

In an online exam for a programming job, I was asked to code, in python, a function that would receive an input list containing a sequence of 0’s and 1’s. The list always has at least one element, and it’s guaranteed that the elements are all 0’s and ‘1s. The function needs to find the longest subsequence of alternating 0’s and 1’s

Where does my code fail? Longest sequence of alternating 0’s and 1’s

In an online exam for a programming job, I was asked to code, in python, a function that would receive an input list containing a sequence of 0’s and 1’s. The list always has at least one element, and it’s guaranteed that the elements are all 0’s and ‘1s. The function needs to find the longest subsequence of alternating 0’s and 1’s

Where does my code fail? Longest sequence of alternating 0’s and 1’s

In an online exam for a programming job, I was asked to code, in python, a function that would receive an input list containing a sequence of 0’s and 1’s. The list always has at least one element, and it’s guaranteed that the elements are all 0’s and ‘1s. The function needs to find the longest subsequence of alternating 0’s and 1’s