NAINAAAA's blog

By NAINAAAA, history, 46 hours ago, In English

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.

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it

By NAINAAAA, history, 3 years ago, In English

Recenty i got stuck in a problem in which i was suppposed to figure out length of longest common subbarray among all rows of a given matrix(n*m) where each row contains permutaion of (1...m) integers .Can anytell how to approach this problem constraints n*m<=1e5 Thanks :)

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it