Checking whether Subtree or not!

@everule1 @ssjgz @akshitm16 Can anyone confirm what are advanced string matching?
KMP OR Z OR RABIN-KARP?
What should i learn? Is it okay If I learn anyone? which is the most optimised or if it varies case-to-case pls mention cases!
Just wanted to know difference between all three algos…nothing else

They are all completely different. It’s just that all of them can also be use to do string matching. Btw, I wouldn’t recommend rabin karp, because it has hashes. Imo Z algorithm is very simple to implement and deterministic.

Hey I noticed some strange thing. When I am submitting the (.find) which usually gives TLE…5-6 times it is getting AC in 1 out of 5-6 tries. Why so?
@everule1 @ssjgz @akshitm16 @humane

How much time does the AC solution take, and what is the time limit?

some time its showing 0.96 and some time 0.72 @ssjgz
and most of the time TLE with 1.9 @ssjgz

Probably just general variation based on server load, etc :man_shrugging:

1 Like

but tle to AC is strange!!?? coz its naive based not hashing type @ssjgz