Given a binary array consisting of only 0s and 1s, find the maximum distance between two elements with value 0 in a subarray {l,r}. Examples: Input : arr = {1,0,0,1}, l=0, r=3 Read more →
Arrays
106 postsGiven an Array consisting of N integers, Count the number of contiguous subarrays where each element in the subarray appears 2 or more times. Examples : Input : n = 3 arr Read more →
Programming has never been easier. Even though you may have mastered a particular programming language, there might still be some concepts that may make you dizzy on reading it. This article contains Read more →
Given an integer array arr[] a non negative integer k, print k-th distinct element in an array. The given array may contain duplicates and the output should print k-th distinct element among Read more →
Dynamix array is also known as Vector, Dynamic array is an array that resizes itself up or down depending on the number of content. Linked lists have both advantages and disadvantages. The Read more →
Array is collection of items having same data type stored in contiguous memory location. An array is derived data type in C programming language which can store similar types of data in Read more →