Example:
You are given an array of integers. Write a program to check if there are three consecutive even numbers or three consecutive odd numbers in the array. If found, print "True", otherwise print "False". Tcs Coding Questions 2021
Input: [1, 2, 3, 4, 5] Output: [5, 1, 2, 3, 4] Example: You are given an array of integers
Input: arr = [1, 5, 7, 1, 5], K = 6 Pairs: (1,5) at indices (0,1) and (0,3), but unique values? Here values (1,5) is one pair. So answer = 1. otherwise print "False". Input: [1