Close

Odd number out

Given an array of numbers which contains all even numbers except one, or all add numbers except one. How do you find the different number? For example consider the array [1, 2, 3, 5, 9], 2 is the different number. Similarly in the array [10, 6, 7, 24, 36], 7 is the different number. This…

Next Round – A problem from Codeforces

This problem is from Codeforces. If you want to solve this problem on your own, follow this link. Here is the simplified problem statement. Given a list of scores of contestants in a competition, arranged in decreasing order. We have to calculate the number of people qualified for the next round.This is determined as follows,…

Inverse permutation problem

This problem is from code forces. If you want to try this problem, follow this link. Here is the simplified problem statement. Given a group of N friends, each one has given a gift to other friend or themselves. An input array is given which indicates from whom each one has received their gifts. We…

Continuous sequence

This problem is from codeforces. If you want to solve this problem on your own. Please head over here and solve it!The simplified problem statement is as follows.Given a sequence of 0 and 1s. Check if contains a continuous sequence of 0/1 of length 7.For example see some input output combinations Input                             Output—————————————— 10001010010011                    NO1000000001100                    …

Number of matching pairs

This problem is from Codeforces. If you want to solve this problem on your own. Follow the link.Following is the abridged(simplified) problem statement for the above problem.Given an array containing values in the range [-10,10], find out how many number of matching pairs are possible? A pair of numbers is said to be matching if…