Simple question but can we do it w/o using any map in O(n)?

Правка en1, от NAINAAAA, 2024-06-15 18:10:38

HELLO CF community i'm wondering can we solve below problem w/o using map in O(n)? constraint n < 1e5 & |a[i]| < 1e9

Given an array of integers, find the first repeating element in it. We need to find the element that occurs more than once and whose index of first occurrence is smallest.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский NAINAAAA 2024-06-15 18:10:38 353 Initial revision (published)