- 博客(6)
- 资源 (2)
- 收藏
- 关注
原创 Leetcode sortedArrayToBST
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ cla
2013-09-26 20:50:43 396
原创 Leetcode rotate list
class Solution { public: ListNode *rotateRight(ListNode *head, int k) { // Start typing your C/C++ solution below // DO NOT write int main() function ListNode * newhea
2013-09-26 20:50:01 293
原创 Letter Combinations of a Phone Number
Letter Combinations of a Phone NumberJan 27 '125504 / 16698 Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on
2013-09-24 22:08:51 688
原创 Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 class Solution { public: int reverse(int x) { // Start typing your C/C++ solution be
2013-09-24 21:36:35 737
原创 leetcode String to Integer (atoi)Dec 27 '117626 / 35090
String to Integer (atoi)Dec 27 '117626 / 35090 Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see bel
2013-09-24 21:26:12 659
转载 常用的字符串操作函数实现
在一个字符串中找到第一个只出现一次的字符。如输入abaccdeff,则输出b。 代码则可以如下编写: //查找第一个只出现一次的字符, //copyright@ yansha //July、updated,2011.04.24. char FirstNotRepeatChar(char* pString) { if(!pString)
2013-07-07 21:12:56 398
算法导论习题及答案详解
2009-10-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人