I've used DP. IMO, the *real* problem is to cope with the requirement, that the leftmost pair of characters is always merged.
I couldn't get the obvious cubic algorithm to handle this. I got accepted with O(n^4) algo: for each morphing step, run the O(n^3) DP to find which pair of characters ...
Search found 2 matches
- Sat Dec 31, 2005 11:54 am
- Forum: Volume 109 (10900-10999)
- Topic: 10981 - String Morphing
- Replies: 31
- Views: 16699
- Thu Dec 29, 2005 11:48 am
- Forum: Other words
- Topic: Copyright of image
- Replies: 7
- Views: 5353