Comments
omycle on 十一月 2nd, 2009 at 3:49 下午 #
用STL里面的reverse更简洁 [ 引用 ]
superhaiou on 十一月 2nd, 2009 at 5:52 下午 #
一般不推荐用库函数滴~ [ 引用 ]
很好很QD on 十一月 17th, 2009 at 11:03 下午 #
我想到的办法是:先将每个单词按字母反序,再将整个句子按字母反序,这样可以在线性时间复杂度内完成,且不需要额外的存储空间。比如Good Morning: [ 引用 ]
superhaiou on 十一月 19th, 2009 at 10:32 上午 #
最简单的就是从后往前读~~ [ 引用 ]
kumbayaco on 十一月 28th, 2009 at 2:56 下午 #
superhaiou on 十一月 28th, 2009 at 6:01 下午 #
算法题有几个人会用递归~ [ 引用 ]
cesc jiang on 十二月 29th, 2009 at 9:58 上午 #
先分词用spilt函数 然后用stack,最后取出也可以的 [ 引用 ]
|
|
|
|
|
||