Nathan works as an HR in a private company. He had an opportunity to interview students from various disciplines. He asked the candidates to perform…
Given an array of meeting time intervals consisting of start and end times [ [ s1, e1], [ s2, e2], …] ( si < ei…
Laasya bought a new volleyball in the sports shop. It looks like a medium size. She somehow found the radius of the sphere. But she…
Binita is playing a grid like chess. The game will be played on a rectangular grid consisting of N rows and M columns. Initially all…
Tina’s trainer have given her two positive integers U and V. Now her task is to find the number of pairs if positive intgers(X,Y)such that…
Given a set of distinct positive integers, find the largest subset such that every pair ( Si, Sj ) of elements in this subset satisfies:Si…
Given an array of n integers nums and a target, find the number of index triplets i, j, k with 0 <= i < j…
Multiple Queries using array numsGiven an integer array nums, handle multiple queries of the following types:Update the value of an element in nums.Calculate the sum…
All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: “ACGAATTCCG”. When studying DNA, it is sometimes…
Greatest of three numbers Rahul is entering three numbers into the system. He has to find the biggest number from thatinputs. Help rahul to find…
ArmstrongIf the sum of cube of each number is again equal to the number then it is a Armstrong number. simple logic.Refer sample Inputs and…
HELLO WORLD in C++ Help raj to print “The Input” from the user end and it is the first program to raj. Give the input…
Ramu is collecting some random inputs from his maths teacher.Help ramu to calculate the cube root of the user input by using C++ program.Input: Get…
Given binary array, find count of maximum number of consecutive 1’s present in the array. Input_1:arr[ ] : 1 1 0 0 1 0 1…
You are given an integer array score of size n, where score[i] is the score of the ith athlete in a competition. All the scores…
Given an integer num, return a string of its base 7 representation. Input_1:Give an integer number : 100 Output:202 Input_2:Give an integer number : -7…
Given an integer array nums and an integer k, return the kth largest element in the array. Note that it is the kth largest element…
Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3]…. Input_1:Array_nums : 20 10 8 6 4 2Output:[2, 10, 6, 8, 4,…
Repeating ElementsGiven an array nums containing n + 1 integers where each integer is between 1 and n (inclusive) Input_1:Elements : 8 8 7 5…
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is…