This definitely works, but uses too much memory. I

來源: 2009-03-04 06:47:32 [博客] [舊帖] [給我悄悄話] 本文已被閱讀:

wonder whether there exists an algorithm that just scans the string once and only uses a constant number of extra cells besides the string.