[gcj] Re: Intuitive explanation of an efficient solution for problem C "Welcome to Code Jam"

2009-09-08 Thread sameer mhatre
as I don't think the hash > map guarantees you'll get the characters back in the same order > they're put in. If the target string had two adjacent repeated > characters (like if it said "welcome to google code jam"), then would > need to ensure the first &#x

[gcj] Re: Intuitive explanation of an efficient solution for problem C "Welcome to Code Jam"

2009-09-06 Thread sameer mhatre
Your solution is same as mine. Only difference is that I am traversing test string backward and using hash map to improve running time. You can improve the running time of your code by avoiding inner loop which traverse 0 to 18. We can keep each distinct characters of target string "welcome to cod