Skip to content

Tag Archives: Constructive Algorithms

Given two integer N and X. N represents the number of rows and columns of a table. And the element at the ith row and… Read More
, Given an array arr[] of N integers. The task is to find the largest elements in the first half and the second half of… Read More
Given a linked list. The task is to print the difference between the first odd-positioned node with the sum of all other odd-positioned nodes. Examples: … Read More
Given an array a of size N. The task is to find the maximum sum of array possible by dividing the array into three segments… Read More
Given a balanced parentheses string which consists of ‘(‘ and ‘)‘. The task is to find the number of balanced parentheses substrings in the given… Read More
Given a binary array arr[], the task is to find the length of the longest sub-array of the given array such that if the sub-array… Read More
Given an array arr[] and an integer K, the task is to find the count of pairs (arr[i], arr[j]) from the array such that |arr[i]… Read More
Given a queue and the task is to sort it using recursion without using any loop. We can only use the following functions of queue: … Read More
Given an array of N integers, the task is to arrange them in a circular arrangement in such a way that the element is strictly… Read More
Given an array, arr[] of size N and an integer K which means there are N piles of coins and the ith contains arr[i] coins.… Read More
Given two integers X and Y. X and Y represent any two values among (A + B), (A + C) and (B + C). The… Read More
Given two sides of a triangle s1 and s2, the task is to find the minimum and maximum possible length of the third side of… Read More
Given a string str containing lowercase alphabets, the task is to count the sub-strings that contain all the vowels at-least one time and there are… Read More
Given three sorted integer arrays A[], B[] and C[], the task is to find three integers, one from each array such that they sum up… Read More
Given two strings s1 and s2, the task is to find the minimum number of steps required to convert s1 into s2. The only operation… Read More

Start Your Coding Journey Now!