pkay_24's blog

By pkay_24, history, 4 years ago, In English

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"

Full text and comments »

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

By pkay_24, history, 5 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • -8
  • Vote: I do not like it