![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
weixin_43989697
这个作者很懒,什么都没留下…
展开
-
编程集训 day01 hash table
对于hash table 的理解(不知道理解是否正确,希望有大神指点一二): 第一次接触hash table, 所以查找了很多资料(后面有放链接)试图理解:Hash table 可以加快数据的查找速度,节省时间; 数据存储:将字符串中的每个字符转换成ASCII码->所有数字求和->求得的结果÷存储空间->取余并存放相应位置 1.0. LeetCode #1. two sum...原创 2019-01-26 07:57:13 · 147 阅读 · 0 评论 -
编程集训 day 06 recursion
Letter Combinations of a Phone Number solution class Solution { public: vector<string> letterCombinations(string digits) { vector<string> res; length=digits.size(); ...原创 2019-01-31 17:42:49 · 106 阅读 · 0 评论 -
编程集训 day02 linked list
midterm 前夕作业有点多,写的简单点。。。 Linked list cycle II solution 1 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(N...原创 2019-01-27 17:18:43 · 102 阅读 · 0 评论 -
编程集训 day 03 queue and heap
solution class Solution { public: vector&lt;int&gt; maxSlidingWindow(vector&lt;int&gt;&amp; nums, int k) { deque&lt;int&gt; dq; vector&lt;int&gt; v; for(i原创 2019-01-28 03:03:02 · 86 阅读 · 0 评论 -
编程集训 day07 dynamic programming
Palindrome Partitioning II solution class Solution { public: int minCut(string s) { int len=s.size(); vector<vector<int>> flag(len,vector<int>(len)); for(...原创 2019-02-01 18:07:09 · 213 阅读 · 0 评论 -
编程集训 day03 binary tree
Validate Binary Search Tree solution class Solution { public: bool isValidBST(TreeNode* root) { return isValidBST(root, LONG_MIN, LONG_MAX); } bool isValidBST(TreeNode* root, lo...原创 2019-01-29 16:53:50 · 103 阅读 · 0 评论 -
编程集训 day05 recursion & dynamic programming
recursion “The process in which a function calls itself is known as recursion and the corresponding function is called the recursive function ”. Factorial function is a popular example to understand...原创 2019-01-30 01:19:31 · 134 阅读 · 0 评论