Tuesday, August 2, 2016

Find Duplicate Element

Given: a list of integers where, the integers in the list are in the range 1..n and the list has a length of n+1. Find the duplicate element. The complexity of should be at most O(n).

Link to Code on JSfiddle: https://jsfiddle.net/dhiviyad/zwsan7zt/1/ 



No comments:

Post a Comment