Minimum increments required to make array elements alternately even and odd

Given an array arr[] consisting of N positive integers, the task is to find the minimum number of increments required to make the array arr[]… Read More

The post Minimum increments required to make array elements alternately even and odd appeared first on GeeksforGeeks.


Given an array arr[] consisting of N positive integers, the task is to find the minimum number of increments required to make the array arr[]… Read More
The post Minimum increments required to make array elements alternately even and odd appeared first on GeeksforGeeks.

Read More

Count N-length Binary Strings consisting of “11” as substring

Given a positive integer N, the task is to find the number of binary strings of length N which contains “11” as a substring. Examples:… Read More

The post Count N-length Binary Strings consisting of “11” as substring appeared first on GeeksforGeeks.


Given a positive integer N, the task is to find the number of binary strings of length N which contains “11” as a substring. Examples:… Read More
The post Count N-length Binary Strings consisting of “11” as substring appeared first on GeeksforGeeks.

Read More

Check if an area P can be obtained from an area of N * M

Given integers N, M and P, the task is to check if is possible to find a rectangular area of P sq. units inside a… Read More

The post Check if an area P can be obtained from an area of N * M appeared first on GeeksforGeeks.


Given integers N, M and P, the task is to check if is possible to find a rectangular area of P sq. units inside a… Read More
The post Check if an area P can be obtained from an area of N * M appeared first on GeeksforGeeks.

Read More

Find all Ramanujan Numbers that can be formed by numbers upto L

Given a positive integer L, the task is to find all the Ramanujan Numbers that can be generated by any set of quadruples (a, b,… Read More

The post Find all Ramanujan Numbers that can be formed by numbers upto L appeared first on GeeksforGeeks.


Given a positive integer L, the task is to find all the Ramanujan Numbers that can be generated by any set of quadruples (a, b,… Read More
The post Find all Ramanujan Numbers that can be formed by numbers upto L appeared first on GeeksforGeeks.

Read More

Most frequent character in a string after replacing all occurrences of X in a Binary String

Given a string S of length N consisting of 1, 0, and X, the task is to print the character (‘1’ or ‘0’) with the… Read More

The post Most frequent character in a string after replacing all occurrences of X in a Binary String appeared first on GeeksforGeeks.


Given a string S of length N consisting of 1, 0, and X, the task is to print the character (‘1’ or ‘0’) with the… Read More
The post Most frequent character in a string after replacing all occurrences of X in a Binary String appeared first on GeeksforGeeks.

Read More

Modify string by rearranging vowels in alphabetical order at their respective indices

Given a string S of length N, the task is to sort the vowels of the given string in alphabetical order at place them accordingly… Read More

The post Modify string by rearranging vowels in alphabetical order at their respective indices appeared first on GeeksforGeeks.


Given a string S of length N, the task is to sort the vowels of the given string in alphabetical order at place them accordingly… Read More
The post Modify string by rearranging vowels in alphabetical order at their respective indices appeared first on GeeksforGeeks.

Read More

Sort an array according to the increasing frequency of the digit K in the array elements

Given an array arr[] of size N, and an integer K representing a digit, the task is to print the given array in increasing order… Read More

The post Sort an array according to the increasing frequency of the digit K in the array elements appeared first on GeeksforGeeks.


Given an array arr[] of size N, and an integer K representing a digit, the task is to print the given array in increasing order… Read More
The post Sort an array according to the increasing frequency of the digit K in the array elements appeared first on GeeksforGeeks.

Read More

Calculate score of parentheses from a given string

Given string str of length N, consisting of pairs of balanced parentheses, the task is to calculate the score of the given string based on… Read More

The post Calculate score of parentheses from a given string appeared first on GeeksforGeeks.


Given string str of length N, consisting of pairs of balanced parentheses, the task is to calculate the score of the given string based on… Read More
The post Calculate score of parentheses from a given string appeared first on GeeksforGeeks.

Read More

Minimize increments required to make differences between all pairs of array elements even

Given an array, arr[] consisting of N integers, the task is to minimize the number of increments of array elements required to make all differences… Read More

The post Minimize increments required to make differences between all pairs of array elements even appeared first on GeeksforGeeks.


Given an array, arr[] consisting of N integers, the task is to minimize the number of increments of array elements required to make all differences… Read More
The post Minimize increments required to make differences between all pairs of array elements even appeared first on GeeksforGeeks.

Read More

Sum of numbers obtained by the count of set and non-set bits in diagonal matrix elements

Given a square matrix mat[][] of dimension N*N, convert the elements present in both the diagonals to their respective binary representations and perform the following… Read More

The post Sum of numbers obtained by the count of set and non-set bits in diagonal matrix elements appeared first on GeeksforGeeks.


Given a square matrix mat[][] of dimension N*N, convert the elements present in both the diagonals to their respective binary representations and perform the following… Read More
The post Sum of numbers obtained by the count of set and non-set bits in diagonal matrix elements appeared first on GeeksforGeeks.

Read More