- 博客(3)
- 收藏
- 关注
转载 帕斯卡三角形二
class Solution {public: vector getRow(int rowIndex) { // IMPORTANT: Please reset any member data you declared, as // the same Solution instance will be reused for each test ca
2015-02-21 19:59:58
328
原创 LeetCode:Pascal's Triangle一
#include#include#includeusing namespace std;vector > generate(int numRows) { // IMPORTANT: Please reset any member data you declared, as // the same Solution instance will be reused for each te
2015-02-21 18:48:55
158
原创 字符串翻转
暴力翻转#include#includeusing namespace std;void LeftShiftOne(string &s, int n){ char t = s[0]; //保存第一个字符 for (int i = 1; i < n; i++) { s[i - 1] = s[i]; } s[n - 1] = t;}v
2015-02-20 21:11:17
183
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人