Find max and 2nd max array elements. check if duplicates are are present in an array or not
Anonymous
1. Sort the array using sort() function and return last and second last element in c++ 2. Using Map we can check duplicates . Insert all elements in map and check the count. If count >1 , duplicate found
Check out your Company Bowl for anonymous work chats.