Solution: Find Duplicates in a List With No Repetition
Let's look at the various solutions to find the duplicates in a list with no repetition.
Solution #1: brute force
Explanation
The solution takes one element from the list, compares it with every other element (starting from i + 1), and checks if they both are equal. If they are, it adds it to the resultant list if the number is not present already.
Time complexity
The list is iterated once for each element present, so the time complexity is in ...