随笔分类 -  LeetCode题解

上一页 1 ··· 13 14 15 16 17
摘要:1 //双指针算法模板+哈希表 2 class Solution 3 { 4 public: 5 int lengthOfLongestSubstring(string s) 6 { 7 unordered_map<char,int> nums; 8 int res = 0; 9 for(int i 阅读全文
posted @ 2020-03-15 18:11 Jinxiaobo0509 阅读(123) 评论(0) 推荐(0)
摘要:1 class Solution 2 { 3 public: 4 ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) 5 { 6 ListNode* dummy = new ListNode(-1); 7 ListNode* pre = dummy 阅读全文
posted @ 2020-03-15 18:10 Jinxiaobo0509 阅读(119) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/two-sum/ 1 //哈希表 2 class Solution 3 { 4 public: 5 vector<int> twoSum(vector<int>& nums, int target) 6 { 7 unordered_m 阅读全文
posted @ 2020-03-15 17:33 Jinxiaobo0509 阅读(100) 评论(0) 推荐(0)

上一页 1 ··· 13 14 15 16 17