In this article, we will discuss how to generate a random password of a given length consists of any characters. Approach: The below-given program involves… Read More

# Category Archives: Arrays

Given an array arr[] consisting of numeric strings, the task is to calculate Greatest Common Divisor of the given array. Considering strings ‘A’ and ‘B’,… Read More

Given two arrays arr[] and brr[] of size N and M respectively, the task is to count the maximum number of elements that can be… Read More

Given an array of pairs arr[] of size N, the task is to find any two pairs (a, b) and (c, d) such that a… Read More

Given an array arr[] consisting of N integers in the range [0, M] and an integer M, the task is to count the number of… Read More

Given an array arr[] consisting of N positive integers, the task is to left-shift the digits of array elements such that the array modifies to… Read More

Given a sorted array arr[] of size N (1 ≤ N ≤ 105) and two integers A and B, the task is to calculate the… Read More

Given a binary array arr[] of size N, the task is to find the maximum count of 0s that can be converted into 1s such… Read More

Given an array of strings Files[], representing name of some files, the task is to sort the array based on the lexicographical order of the… Read More

Given an array arr[] of size N an integer K, the task is to find the maximize the first element of the array by performing… Read More

Given an array arr[] consisting of N integers and an integer X, the task is to perform integer division on the array elements by X… Read More

Given an array arr[], the task is to find the count of array elements satisfying the following conditions: The array elements should be strictly greater… Read More

Given an array arr[] and an integer value K, the task is to count the maximum number of array elements that can be selected such… Read More

Given an array arr[] of size N (1 ≤ N ≤ 105), the task is to find the number of ways to select triplet i,… Read More

Given two arrays arr1[] and arr2[] of size N and M respectively, the task is to count the minimum number of swaps required between the… Read More