Google Phone screen | SWE3 | SWEIII | L4 | Bangalore

Anonymous User
5514
Dec 22, 2024

You are given pi in form of a string e.g. pi = "314159265359"
You have to return a list of indexes where i = pi[i]

  • consider 1 based indexes.
  • for multi digit indexes this is the matching criteria.
    i = 456 and pi[454] = '4' pi[455] = '5' pi[456] = '6'
  • string length can go upto 10^6
Comments (17)