Count number of substrings with exactly k distinct characters | Coding Interview Questions Series

preview_player
Показать описание


if you find the content useful and worth shareable, then share it among your friends. So, that they can also increase their level too.

Connect & Contact Us:

Disclaimer: The Views presented in this Video are solely mine. We are not representing any Company or organization. We are only telling our opinions not talking on behalf of any organization.

#codinginterviewquestions
#DistinctCharacters
#rksoltech
Рекомендации по теме
Комментарии
Автор

O(n) solution required in GFG, Brute force to sb hi kr lete h.

VikashYadav-xzdk
Автор

TLE error, waste of time in watching this code

rohandevaki
Автор

ca is not a substring but a subsequence.

anupamtiwary
Автор

GFG has same code
we want solution in O(n)

kalppanwala
Автор

Total no of substrings according to formula is 6 while the no of substrings you created were 7.

praveen
Автор

ah, i was expecting O(n) with sliding window or prefix sum

shashankvashishtha
Автор

bhai tu pehle bolna seekh le....tu lag kyu karte rehta hai bolte bolte

factsandtales
Автор

this is just a better approach of brute-force. gives TLE

taneyasoni
welcome to shbcf.ru