Posts by Sakshi Singh
Author Biographical Info: Not available
Consider a given array with N integers, where each element represents the ratings of N children standing in a line. We have to distribute minimum candies in C++ with the greedy alg.... Read More
Consider two given integers N and K, We have to find the Kth permutation sequence from integer 1 to N using C++. For example, Suppose N=3 and K=4, Now, the order list of permutatio.... Read More
In this tutorial, We will learn how to implement an efficient C++ program to count the number of subarrays having the given XOR. Consider an array A[] and a given number B, We have.... Read More
In this tutorial, We will learn how to check and if there exists any subarray with sum equals to zero or not in C++. Implement a C++ program to check if an integer array contains a.... Read More
In this tutorial, We’ll learn how to find the shortest unique prefix for every word in an array using C++. Assume that no word from the array is the prefix of the other. This.... Read More
In this tutorial, We will learn how to return largest divisible subset in an array using C++. A subset is said to be divisible if every pair (subset[i], subset[j]) of subset satisf.... Read More
In this tutorial, we will learn how to search for a range of an element in the given sorted array in C++. Consider a given sorted array A with possibly duplicate elements. We have .... Read More