1.3

来源:互联网 发布:网络语蜡烛什么意思 编辑:程序博客网 时间:2024/05/07 15:34

原文:

Design an algorithm and write code to remove the duplicate charactersin a string without using any additional buffer. NOTE: One or twoadditional variables are fine. An extra copy of the array is not.

FOLLOW UP

Write the test cases for this method.

译文:

设计算法并写出代码移除字符串中重复的字符,不能使用额外的缓存空间。注意:可以使用额外的一个或两个变量,但不允许额外再开一个数组拷贝。

进一步地,

为你的程序写测试用例。

原创粉丝点击