We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b54aa5 commit b0ed9f8Copy full SHA for b0ed9f8
List-2/has22.py
@@ -0,0 +1,6 @@
1
+def has22(nums):
2
+ n = len(nums)
3
+ for i in range(n-1):
4
+ if nums[i] == 2 and nums[i+1] == 2:
5
+ return True
6
+ return False
0 commit comments