Problem 01 – Find the duplicates

Problem Description:

Suppose, there are N X N elements into N arrays as input. Your task is to find out the duplicate number within N X N elements which exists at maximum number. If there are no such duplicates print “Duplicates are not available” without quotes but if there are two or more maximum duplicates exists print the largest number from those duplicate numbers.

The input will begin with an integer N(N>=1) and following N lines contain N inputs in each line where the range of each input P is (1<=P<=10^5) 

 

Sample Input 01:

3

2 3 3

3 2 2

5 1 4

Sample Input 02:

3

9 8 7

6 4 5

2 1 3

Sample Output 01:

3

Sample Output 02:

Duplicates are not available

Solution:
Share

One thought on “Problem 01 – Find the duplicates

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Lean Blog by Crimson Themes.