Given a an array of even size N. The task is to find that is it possible to reorder it in such way so that the sum of left half is not Read more →
Data Structures
5 postsGiven an array arr[] of N dates in the form of “dd-mm-yyyy”, the task is to sort these dates in ascending order. Examples: Input: arr[] = { "25-08-1996", "03-08-1970", "09-04-1994" } Output: Read more →
Given an integer K and an array of integers, you have to find whether is it possible to reduce the array to a single element equal to k or not. You can Read more →
Given an array arr[] of N strings, the task is to sort these strings according to the numbers of matches required to represent them. Examples: Input: arr[] = { "123", "46", "8", Read more →
There is an array containing prices of n tickets. A number m is defined as the size of a subsequence S of tickets. Each element in the subsequence covers a continuous range Read more →
Sorting is one of the most fundamental thing in all programming languages. One of the Simple Approach is to use sort() function in Kotlin. In Kotlin any Data types of an Array Read more →
Given an integer k and array of length N find the min no of move to make all the elements divisible by k. In one move you can go one of the Read more →
Given an array arr[ ] of N non-negative integers, the task is to sort these integers according to sum of their digits. Examples : Input : 12 10 102 31 15 Output Read more →
You are given two strings string1 and string2. Your task is to find length of longest consecutive occurrences of second string that occurs in first string. Examples: Input: string1="AAACBBAAAA", string2="A" Output: 4 Read more →
Given an array of size N. The task is to find the maximum and the minimum element of the array using the minimum number of comparisons. Examples: Input : A[]={4,2,-1,5,0,-5,7,3,6} Output : Read more →