## Maximize the happiness of the groups on the Trip

A trip to mystical land is going to be organized in ByteLand, the city of Bytes. Unfortunately, there are limited seats say A and there… Read More »

- Sort an array without changing position of negative numbers
- Nth number whose sum of digit is multiple of 10
- Given two arrays count all pairs whose sum is an odd number
- Find maximum xor of k elements in an array
- What is Competitive Programming and How to Prepare for It?
- Find minimum difference between any two elements | Set 2
- Why Should I Learn Coding?
- Check whether two strings contain same characters in same order
- Total number of possible Binary Search Trees using Catalan Number
- Maximize the happiness of the groups on the Trip
- Lexicographically Smallest Topological Ordering
- Find the number of pair of Ideal nodes in a given tree
- Find the minimum number of elements that should be removed to make an array good
- Sum of digits with even number of 1's in their binary representation
- Find sub-arrays from given two arrays such that they have equal sum
- Count of all possible values of X such that A % X = B
- Equal Sum and XOR of three Numbers
- Check which player visits more number of Nodes
- Find the Nth Mosaic number
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Check whether a number can be represented as sum of K distinct positive integers
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Longest string in an array which matches with prefix of the given string
- Make the list non-decreasing by changing only one digit of the elements
- Generate elements of the array following given conditions
- Count of strings whose prefix match with the given string to a given length k
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Find the time which is palindromic and comes after the given time
- Find two vertices of an isosceles triangle in which there is rectangle with opposite corners (0, 0) and (X, Y)
- Print the path between any two nodes of a tree | DFS

A trip to mystical land is going to be organized in ByteLand, the city of Bytes. Unfortunately, there are limited seats say A and there… Read More »

Given two strings s1 and s2, the task is to find whether the two string contain the same characters that occur in the same order.… Read More »

Given an array of strings arr[] and Q queries where each each query consists of a string str, the task is to find the longest… Read More »

Given an N * M matrix mat[][] which consists of two types of characters ‘.’ and ‘_’. The task is to fill the matrix in… Read More »

Given a string str of size N, the task is to find the sum of all ASCII values of the characters which are present at… Read More »

Given two integers A and B. The task is to find the count of all possible values X such that A % X = B.… Read More »

Given an integer array of size n and a number k. If the indexing is 1 based then the middle element of the array is… Read More »

Given two integer N and K, the task is to find the sum of all the numbers from the range [1, N] excluding those which… Read More »

Given a string str which stores the time in the 24 hours format as HH:MM such that 0 ≤ HH ≤ 23 and 0 ≤… Read More »

Given a binary string str of length N and two integers A and B such that 0 ≤ A < B < n. The task… Read More »

Given two integers N and K, the task is to check whether N can be represented as sum of K distinct positive integers. Examples: Input:… Read More »

Given two integers a and b, the task is to check whether the product of integers from the rage v[a, b] i.e. a * (a… Read More »

Given an integer K and a range [L, R], the task is to count the quadruplet pairs from the given range having gcd equal to… Read More »

Given a N * N chessboard, the task is to count the number of squares having the odd side length. Example: Input: N = 3… Read More »

Given a range [L, R] where 0 ≤ L ≤ R ≤ 108. The task is to find the count of integers from the given… Read More »