10 2015 档案

[leetcode]Remove Nth Node From End of List
摘要:/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *... 阅读全文

posted @ 2015-10-23 16:08 Mereyct 阅读(177) 评论(0) 推荐(0)

[leetcode]Palindrome Number
摘要:class Solution {public: bool isPalindrome(int x) { if(x < 0) return false; if(x < 10) return true; int temp1; int temp2... 阅读全文

posted @ 2015-10-21 22:31 Mereyct 阅读(190) 评论(0) 推荐(0)

[leetcode]Integer to Roman
摘要:class Solution {public: string intToRoman(int num) { string a[10] = {"","I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}; stri... 阅读全文

posted @ 2015-10-20 22:18 Mereyct 阅读(226) 评论(0) 推荐(0)

[leetcode]String to Integer (atoi)
摘要:class Solution {public: int myAtoi(string str) { long long sum = 0; int temp1 = 1; int max1 = 0x7fffffff; int min1 = ... 阅读全文

posted @ 2015-10-20 20:29 Mereyct 阅读(216) 评论(0) 推荐(0)

[leetcode]ZigZag Conversion
摘要:1 class Solution { 2 public: 3 string convert(string s, int numRows) { 4 if(numRows <= 1 || s.size() == 0) 5 return s; 6 ... 阅读全文

posted @ 2015-10-20 13:40 Mereyct 阅读(143) 评论(0) 推荐(0)

Leetcode那点事儿
摘要:1 、Two Sum 2、Add Two Numbers 3、Longest Substring Without Repeating Characters 7、Reverse Integer 26、Remove Duplicates from Sorted Array 由于 一道道加 略麻烦,所以打 阅读全文

posted @ 2015-10-05 00:58 Mereyct 阅读(247) 评论(0) 推荐(0)

导航