Pregunta de entrevista de Siemens Digital Industries Software

Find the duplicate in an Array

Respuesta de la entrevista

Anónimo

27 de mar de 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)