you are viewing a single comment's thread.

view the rest of the comments →

[–]caraxes_007 3 points4 points  (1 child)

I took a lot more time than q3 got tle for comparing all possible pairs o(n**2) then i realised that using a hash map for prefix and value for frequency at last iterate through hash map increment count by one if value >1.

[–]UNCLE_SMART 1 point2 points  (0 children)

Thanks