Back to Browse

Find the duplicates

33 views
Nov 4, 2022
13:16

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 is greater than or equal to 1 and following N lines contain N inputs in each line where the range of each input P is greater than or equal to 1 and less than or equal to 10^5 Sample Input 01: 3 2 3 3 3 2 2 5 1 4 Sample Output 01: 3 Sample Input 02: 3 9 8 7 6 4 5 2 1 3 Sample Output 02: Duplicates are not available you can visit for details https://www.sukanta.info/programming/competitive-programming/problem-01-find-the-duplicates/

Download

0 formats

No download links available.

Find the duplicates | NatokHD