employer cover photo
employer logo
employer logo

Siemens Digital Industries Software

Engaged employer

Siemens Digital Industries Software interview question

Find the duplicate in an Array

Interview Answer

Anonymous

Mar 27, 2024

Tortoise Hare (Two pointer Method) - Floyd's cycle detection. O(n) time and O(1) space ; Don't use hash map since O(n) space but time O(n)