Kindly go through my code and tell its time complexity
is it still giving tle??
dekh pehle vale soln m toh logical error thi i was using v.end() and it did not guarantee that the last entry in the vector is the shortest string .
But yes it’s logicalyy correct now and is giving a tle
*dekho. … … …
yrr basically yr code is not implementing sliding window concept… check() function ki vjh se complexity increase hori hai… go through my code or through video soln and try to solve again then…
bhaiya check fn toh maxx 256 baar O(1) ka loop chalayega na
matlab kisi bhi time pr map ka size 256 thodi na exceed karega
yrr still compexity to badhegi… every time for for loop increments u are checking that check function… mere ko ye btao sliding window use kha hua aise??? koi to check maintain kro na
sahi bol rhe ho biro shayad
lemme chk pr iski complexity kya bologe
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.