- 博客(239)
- 收藏
- 关注
原创 Leetcode 65.valid number
参考后class Solution {public: bool isNumber(string s) { size_t n = s.size(); size_t i = 0; int nnum = 0; int npoint = 0; while (isspace(s[i])) ++i
2017-11-17 22:35:11 141
原创 64. Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at any
2017-11-14 22:08:54 116
原创 Effective C++ 52. Write placement delete if you write placement new
write placement delete if you write placement new
2017-11-14 09:33:45 149
原创 Leetcode 63. Unique Paths II
Follow up for “Unique Paths”:Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the grid.For ex
2017-11-13 21:55:51 105
原创 Effective C++ 45. Use member function templates to accept "all compatible types."
use member function templates to accept "all compatible types."
2017-11-13 11:18:40 143
原创 Effective C++ 44. Factor parameter-independent code out of templates
factor parameter-independent code out of templates
2017-11-13 10:22:54 236
原创 Effective C++ 49. Understand the behavior of the new-handler
understand the behavior of the new-handler
2017-11-11 21:49:01 127
原创 Effective C++ 46. Define non-member functions inside templates when type conversions are desired
Define non-member functions inside templates when type conversions are desired
2017-11-09 11:29:08 159
原创 Effective C++ 38. Model "has-a or is-implemented-in-terms-of" through composition
Model "has-a or is-implemented-in-terms-of" through composition
2017-11-03 11:27:31 198
原创 Effective C++ 37. Never redefine a function's inherited default parameter value
never redefine a function's inheried default parameter value
2017-11-03 10:42:48 494
原创 *Effective C++ 31. Minimize complilation dependencies between files(handle class & interface class)
handle class & interface class
2017-10-31 09:57:00 248
原创 Leetcode 51 N-Queens
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solutions to the n-queens puzzle.Each
2017-10-30 21:45:32 169
原创 Effective C++ 25. Consider support for a non-throwing swap
consider support for a non-throwing swap
2017-10-28 10:36:16 201
原创 Effecitive C++ 28. Avoid returning "handle" to object internals
avoid returning "handle" to object inernals
2017-10-27 19:26:29 171
原创 Effective C++ 23. Prefer non-member non-friend functions to member functions
prefer non-memer non-friend functions to member functions
2017-10-27 10:00:19 185
原创 Effective C++ 18. Make interfaces easy to use correctly and hard to use incorrectly
Make interfaces easy to use correctly and hard to use incorrectly
2017-10-26 16:41:19 200
原创 Effective C++ 17. Store newed objects in smart pointers in standalone statements
store newed objects in smart pointers in standalone statements.
2017-10-26 15:26:08 162
原创 Effective C++ 14. Think carefully about copying behavior in resource-managing classes
Think carefully about copying behavior in resource-managing classes
2017-10-26 11:06:20 207
原创 Effective C++ 12. Copy all parts of an object
copy all parts of an object
2017-10-26 09:52:58 218
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人