I solved the problem in Java.
My logic to solve the 'Consonants' problem is as follows:
1. Find all possible substrings from the name of length 'n' or greater
(using substring( ) function)
2. In each substring, check if 'n' consonants appear consecutively.



This is an O(N^4) solution. For names of length (10^6)

-- 
Regards,
Vaibhav Tulsyan.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to