Seven different ways of duplicity checks in an Array
Problem Statement: Given an Array of positive Integers Check for the Duplicity with optimum Time Complexity & Space Complexity. Solution: There are many ways to solve the stated problem. The First criteria to solution is determined by fulfilment of customised requirements on expected output for duplicity problem i.e "Correctness of the solution" Examples of requirements : 1. Check for Duplicity only (Elements are not required) 2. Get the list of duplicate integers 3. Remove the duplicate integers 4. Find the maximum repeated integer. 5. Find the 1st repeated Integer. 6. Find the smallest repeated Integer. The second criteria to the solution is determined by Time Complexity and Space Complexity. The most efficient solution in to this problem would be : Time Complexity O(n)/O(1) at worst case and Space Complexity O(1). In the subsequent contents of this article , we will the seven different ways of checking...