Блог пользователя pkay_24

Автор pkay_24, история, 4 года назад, По-английски

Hello Community !!

So this question appeared in one of the interviews I had given.

Given a String s comprising of digits from 0-9. You need to count number of substrings such that each character present in that substring occurs exactly K times.

constraints: N = size of given string 1 <= N <= 10^5 1 <= K <= N

tc: s="1102021222" K=2 Ans=6

6 substrings are s[0:1]="11" , s[0:5]="110202" , s[1:6]="102021" , s[2:5]="0202" , s[7:8]="22" , s[8:9]="22"

Полный текст и комментарии »

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится

Автор pkay_24, история, 5 лет назад, По-английски

Hello community!!

I request the community to make some structured content for learning process to increase your DS and Algo skills for contest apart from giving contest and upsolving. In my belief , i am unable to find appropriate content for a problem while upsolving which is not letting me grow. So I request the community to take out some time and list down the resources of all the Data Structures and Algorithms one should know if he wants to achieve a perticular rating. For example, listing all the DS and Algo required to solve problems of rating 1500-1700.

I think if one gets to know the required content needed to solve a problem of a perticular rating, his range of thoughts to think on that question would become wider.

Cheers

Полный текст и комментарии »

  • Проголосовать: нравится
  • -8
  • Проголосовать: не нравится