An input binary array X[] is given where all the elements are either 0 or 1. Write a program to find the maximum consecutive ones in this binary array.

You are given an array of 1s and 0s and you are given an integer k which signifies the number of flips allowed. Write a program to find the position of zeros which when flipped will produce maximum continuous series of 1s.This is one of the good problems to understand the idea of the sliding window technique. Using this approach, We can solve several interview problems efficiently in O(n) and O(1) space.

Given array X[] of n integers, write a program to return the count of distinct numbers in all windows of size k.

Write a program to find the length of the longest substring without repeating characters. Substring is the continuous sub-part of the string. The aim is to determine the maximum such subpart which has all the unique characters.