Given a number N, the task is to find the sum of the below series till N terms. 1+(1+2)/2+(1+2+3)/3+… till N terms Examples: Input: N… Read More

A header file contains the set of predefined standard library functions. The header file can be included in the program with the C preprocessing directive… Read More

C++ provides us a facility using which one can represent a sequence of characters as an object of a class. This class is std::string. Internally,… Read More

With the constant change in technology and the introduction of innovative ways of transformation of a digital world, we all are evolving day by day.… Read More

Given a string Str of N characters and two strings S1 and S2 of equal length where S1[i] and S2[i] are related to each other,… Read More

Given an array of strings arr[] of size N and an encrypted string str, the task is to find the correct string from the given… Read More

Given three integers M, N and K, the task is to count all the possible paths from the cell (0, 0, 0) to cell (M-1,… Read More

Given arrays arr1[] of size M and arr2[] of size N having length at least 2, the task is for every element in arr1[], maximize… Read More

Given an array arr[] containing N integers. In each operation, a minimum integer is chosen from the array and deleted from the array after subtracting… Read More

Given a binary string S of size N, and a 2D array Q[][] of queries consisting of M pairs of the form {L, R}, the… Read More

Given a string str of N characters, the task is to find the lexicographically smallest string that can be formed by concatenating any prefix and… Read More

Given array arr containing N integers. the task is to find the maximum number of unique elements in the array if each element in the… Read More

Given two strings A and B, print the minimum number of slices required in A to get another string B. In case, if it is… Read More

Understanding the rate at which travel takes place necessitates an understanding of average speed. The speed of travel may change from time to time. In… Read More