摘要:
题目来源: https://leetcode.com/problems/divide-two-integers/题意分析: 不用乘法,除法和mod运算来实现一个除法。如果数值超过了int类型那么返回int的最大值。题目思路: 初步来说,有两个做法。 ①模拟除法的过程,从高位开始除,不够先右挪... 阅读全文
posted @ 2015-10-19 22:06
Ry_Chen
阅读(1366)
评论(0)
推荐(0)
摘要:
题目来源: https://leetcode.com/problems/implement-strstr/题意分析: 输入两个字符串haystack和needle,如果needle是haystack的一个子串,那么返回这个子串在haystack出现的第一个位置,否则返回-1.题目思路: 这个题... 阅读全文
posted @ 2015-10-19 21:39
Ry_Chen
阅读(829)
评论(0)
推荐(0)

浙公网安备 33010602011771号