![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
才不是本人
修身,穷理,有趣
展开
-
leetcode 2.Add Two Numbers
class Solution { public: ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { ListNode* head = new ListNode(0); ListNode* p = head; int cal = 0, tmp; ...原创 2018-11-14 09:43:25 · 110 阅读 · 0 评论 -
大数乘法 leetcode 43. Multiply Strings
class Solution { public: string multiply(string num1, string num2) { int len1 = num1.length(); int len2 = num2.length(); string result(len1+len2, '0');...原创 2018-11-14 14:32:23 · 136 阅读 · 0 评论 -
leetcode 3. Longest Substring Without Repeating Characters
题目地址class Solution { public: int lengthOfLongestSubstring(string s) { std::vector<char> m; int len = s.length(); char tmp; int cnt=0,...原创 2018-11-14 18:24:58 · 111 阅读 · 0 评论 -
LeetCode String to Integer(atoi)
class Solution { public: int myAtoi(string str) { long i = 0; auto it = str.find_first_not_of(" "); bool native = false; if(str[it] == '-') ...原创 2019-02-18 17:41:40 · 164 阅读 · 0 评论