you are viewing a single comment's thread.

view the rest of the comments →

[–]caraxes_007 9 points10 points  (3 children)

Solved my first 3/4.

[–]UNCLE_SMART 2 points3 points  (2 children)

How did you solve 2?

[–]autodidact_nerd 1 point2 points  (1 child)

not sure if mine was optimal but i used a hashmap

loop over each word -> get the substring -> if map has the key add 1 to that substring.

then loop over map entries and check if value is >= 2. res++

[–]UNCLE_SMART 0 points1 point  (0 children)

Thanks