|
|
back to boardI was trying to it in an clever way I was trying to write TRIE for mnemonic words and DFS that tree with phone number. And I have failed. After that, I wrote just 2-D dimensional dynamic programming solution. DP[i] [j] is minimal number of words to memorize substring [i;j]. And I got success. Used Python. Just input, not stdin from sys. Re: I was trying to it in an clever way i think you only need 1 array instead of dp[i,j] Re: I was trying to it in an clever way So probably there is jury solution available on the internet Re: I was trying to it in an clever way So I have examined jury solution Looks too simple Can't believe it is able to solve the problem Re: I was trying to it in an clever way where do you find the jury solution? Re: I was trying to it in an clever way |
|
|