![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
牛课网
leagalhigh
never give up!
展开
-
二维数组中的查找(牛课网)
二分法中,要求mid=(start + end)/ 2,当start==end-1或者start==end时,mid=(start+end)/ 2 的结果都是mid=start。及二分法具有向左偏移的性质。原创 2016-11-26 19:29:26 · 237 阅读 · 0 评论 -
替换空格(牛课网)
这道题有C风格字符串的解答,很巧妙,但是我还是喜欢C++的风格的解法,简单明了:class Solution {public: void replaceSpace(char *str,int length) { if(str == NULL || length <=0) return; string result = ""; in原创 2016-11-27 01:30:48 · 198 阅读 · 0 评论