Consecuitive 2s (Problem 15) - InfyTQ Solution in Python
Consecuitive 2s (Problem 15)
InfyTQ Solution in Python
Photo by Miguel Á. Padriñán from Pexels |
PROBLEM STATEMENT
Write a python function which accepts a list of numbers and returns true if the list contains a 2 next to a 2. Otherwise it should return false.
Sample Input | Expected Output |
---|---|
[ 1,2,1,2,3,4,5,2,2] | True |
[3,2,5,1,2,1,2] | False |
SOLUTION
SHARE
If you find this useful, please share with your friends and Community.
CODE TOGETHER..GROW TOGETHER.
CODE TOGETHER..GROW TOGETHER.
Newer Posts
Newer Posts
Older Posts
Older Posts
Comments