摘要: 对于传统的二分查找,若能找到,则返回target的下标,若找不到则返回-1后,退出函数。齐代码比较简单,如下:int bSearch(vec vec, int start,int end,int target){ int first = start,last = end,mid; whi... 阅读全文
posted @ 2014-12-06 19:29 ElephantKing 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol... 阅读全文
posted @ 2014-12-06 15:57 ElephantKing 阅读(95) 评论(0) 推荐(0) 编辑