- 博客(29)
- 收藏
- 关注
原创 Leetcode 123. Best Time to Buy and Sell Stock III
Best time to buy and sell stock
2018-01-27 10:20:29 162
原创 Leetcode 122. Best Time to Buy and Sell Stock II
best time to buy and sell stock
2018-01-26 21:25:59 96
原创 Effective Modern C++ 36. Specify std::launch::async if asynchronicity is essential
specify std::launch::async if asynchronicity is essential
2018-01-26 20:11:00 168
原创 Effective Modern C++ 34. Prefer lambdas to std::bind
Prefer lambdas to std::bind
2018-01-26 11:01:07 334
原创 Effective Mordern C++ 33. forward
struct X {}; void inner(const X&) {cout "inner(const X&)" << endl;} void inner(X&&) {cout "inner(X&&)" << endl;} templatetypename T> void outer(T&& t) {inner(forward(t));} templatetypename
2018-01-25 21:07:51 177
原创 Leetcode 117. Populating Next Right Pointers in Each Node II
populating next right pointers in each node
2018-01-25 11:45:27 100
原创 Leetcode 116. Populating Next Right Pointers in Each Node
population next right pointers in each node
2018-01-23 21:53:49 202
原创 Leetcode 114. Flatten Binary Tree to Linked List
flatten binary tree to linked list
2018-01-18 20:14:32 107
原创 Effective Modern C++ 32. Use init capture to move objects into closures.
use init capture to move objects into closures
2018-01-17 22:13:11 246
原创 Effective Mordern C++ 26. Avoid overloading on universal references.
avoid overloading on universal references
2018-01-12 22:52:44 164
原创 *Leetcode 109. Convert Sorted List to Binary Search Tree
参考后,这个方法数据中序用的很好/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *//** * Def
2018-01-11 21:07:42 100
原创 Leetcode 108. Convert Sorted Array to Binary Search Tree
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * };
2018-01-11 10:00:47 99
原创 nQueens
#include #include // 第k行的位置是否有效bool isValid(std::vectorint>& p, int k) { if (k > p.size() - 1) return false; for (size_t i = 0; i != k; ++i) { if ((p[k] == p[i]) || (abs(p[k] - p[i]
2018-01-10 21:01:08 158
原创 Leetcode 107. Binary Tree Level Order Traversal II
Binary Tree Level Order Traversal
2018-01-10 10:04:05 93
原创 Leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal
construct Binary Tree from Preorder and inorder Traversal
2018-01-07 22:50:06 133
原创 *Leetcode 103. Binary Tree Zigzag Level Order Traversal
Binary Tree Zigzag level Order Traversal
2018-01-05 22:26:29 123
原创 Leetcode 102. Binary Tree Level Order Traversal
Binary Tree Level order Traversal
2018-01-04 22:25:42 95
原创 Effective Modern c++ 17. the rules govering the special member functions
The C++11 rules govering the special member funcions are thus:Default constructor: Same rules as c++98. Generated only if the class contains no user-declared constructors.Destructor: Essentially same r
2018-01-02 09:33:14 224
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人