## Sum of elements in range L-R where first half and second half is filled with odd and even numbers

Given a number N, create an array such the first half of the array is filled with odd numbers till N and second half of… Read More »

- How can one become good at Data structures and Algorithms easily?
- Understanding The Coin Change Problem With Dynamic Programming
- Subset array sum by generating all the subsets
- Make all numbers of an array equal
- Reach the numbers by making jumps of two given lengths
- Some useful C++ tricks for beginners in Competitive Programming
- Check if a number is perfect square without finding square root
- Sum of XOR of all subarrays
- Sum of the first N Prime numbers
- Sort the array of strings according to alphabetical order defined by another string
- Sum of similarities of string with all of its suffixes
- Length of the longest Subarray with only Even Elements
- Check if it is possible to reach a number by making jumps of two given length
- Find the number in a range having maximum product of the digits
- Make Binary Search Tree
- Print matrix in snake pattern from the last column
- Maximum of all Subarrays of size k using set in C++ STL
- Smallest Pair Sum in an array
- Number of array elements derivable from D after performing certain operations
- Count distinct substrings that contain some characters at most k times
- Minimum number of sets with numbers less than Y
- Count the number of vowels occurring in all the substrings of given string
- Color N boxes using M colors such that K boxes have different color from the box on its left
- Operations required to make the string empty
- Find two numbers whose divisors are given in a random order
- Sum of the multiples of two numbers below N
- Number of subarrays have bitwise OR >= K
- Remove characters from a numeric string such that string becomes divisible by 8
- Program to find the kth character after decrypting a string
- Maximum length substring with highest frequency in a string

Given a number N, create an array such the first half of the array is filled with odd numbers till N and second half of… Read More »

Given two binary strings. The task is to check if string s1 can be converted to string s2 by performing the given operations any number… Read More »

Given a large number N and the task is to check if any permutation of a large number is divisible by 8. Examples: Input: N… Read More »

Given the first two digits of a large number digit1 and digit2. Also given a number c and the length of the actual large number.… Read More »

Although computer programming was once seen as a skill reserved for geeks and computer nerds, it’s now regarded as an essential ability for 21st century… Read More »

Given two bracket sequences S1 and S2 consisting of ‘(‘ and ‘)’. The task is to check if the string obtained by concatenating both the… Read More »

Given an array of size N and Q queries, each query consists of L, R, and K(consider 1 based-indexing for L and R). The task… Read More »

Given n, find the nth number which is not a perfect square among natural numbers (1, 2, 3, 4, 5, 6, … ) Examples: Input… Read More »

Given a number N and the min and max range. Given N values of a and b respectively. The task is to count the number… Read More »

Given a string str, the task is to print the maximum count of characters which are greater than both its left and right character in… Read More »

Given as an input two strings, = , and = , output the alignment of the strings, character by character, so that the net penalty… Read More »

Given an array of n distinct integers and an integer k. Find out the number of sub-sequences of a such that , and . In… Read More »

Given a string, find count of number of larger alphabets for every character of the string. Examples: Input : str = “abcd” Output : 3… Read More »

Given three numbers a, b and m where 1<=a, m<=10^6. Given very large 'b' containing up to 10^6 digits and m is a prime number,… Read More »

Given an array of N integers. If a number occurs more than once, choose any number y from the array and replace the x in… Read More »