# Tagged: arrays

## Print all Subarray of Given Array

“Print all Subarray of Given Array” is an important problem to understand the concept of subarrays of arrays. Here, we are given an array of size ‘n’ and our task is to print all subarray of the given array. Example (Print all Subarray of Given Array): INPUT: Arr = {11,...

## Swap Kth Element from Beginning with Kth element from end

“Swap Kth Element from Beginning with Kth element from end” is a basic problem of array data structure. Here, we are given an array of size ‘n’ and our task is to swap kth element from beginning with kth element from end, where (k<=n). Example (Swap Kth Element from Beginning...

## Print Alternate Elements of an Array

“Print Alternate Elements of an Array” is elementary problem of array data structure. Here, we are given an array of size ‘n’ and our task is to print alternate elements of an array. Alternate elements defines, we are not supposed to print two subsequent elements. Example (Print Alternate Elements of...

## Check if Array is Sorted or Not

“Check if Array is Sorted or Not” is a basic problem of array data structure. Here, we are given an array of size ‘n’ and our task is to check if array is sorted or not. Example: INPUT: Arr = {11, 22, 33, 44, 55, 66, 77, 88, 99} OUTPUT:...

## Find missing smallest positive number

“Find missing smallest positive number” is again one of the favourite technical interview problem. Here, we are given an unsorted array of size ‘n’ and our task is to find the missing smallest positive number from the array. The array may contain both positive and negative integers. Example (Find missing...

## Merge Two Sorted Arrays

“Merge Two Sorted Arrays” is an important problem of array data structure. Here, we are given two sorted arrays of size ‘n’ and ‘m’ respectively. Our task is to write a program to merge these two sorted arrays and the resultant array must itself be sorted array. Example (Merge Two...

## First Repeating Element in an Array

“First Repeating Element in an Array” is an important and one of the favourite technical interview problems based on array data structure. Here, we are given an array of ‘n’ elements and our task is to find the first repeating element in an array.  If all the elements of the...

## Pair in an Array with Given Sum

“Pair in an Array with Given Sum” is one of the favorite technical interview problems. Here, we are given an array with ‘n’ elements and a target value ‘x’. Our task is to find a pair in an array, whose sum is equal to target value ‘x’. Example (Pair in...

## Find Most Frequent Element in an Array

“Find Most Frequent Element in an Array” is one of the favourite technical interview problem based on array data structutre. Here, we are given an array of ‘n’ elements and Our task is to find the most frequent element in an array. If there are multiple elements with same highest...

## Rotate Array Elements by D Positions

“Rotate Array Elements by ‘D’ Positions” is one of the most favorite technical interview problem based on array data structure. Here, we are given an array with ‘n’ elements and a ‘d’ value. Our task is to write a program to rotate the given array by ‘d’ positions in clock...