What would be the Fastest Approach for this problem? (Interview Question)

Правка en2, от i_priyanshu, 2021-08-05 01:06:32

Given a Binary string str and integer x , y. Return the no. of 1's occuring in between x and y indexes if the string can be repeated Infintely.

For Example — Str = "11010" int x = 7; int y = 23; return the count of all 1's between 7 and 23. if the String can be concatenated to itself infinite times.

Теги #interview, #two pointers

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский i_priyanshu 2021-08-05 01:06:32 167
en1 Английский i_priyanshu 2021-08-05 00:21:04 218 Initial revision (published)