05 2015 档案

摘要:leetcode - Compare Version NumbersCompare two version numbers version1 and version2.If version1 > version2 return 1, if version1 ver2[k]) return 1;28 ... 阅读全文
posted @ 2015-05-18 12:43 cnblogshnj 阅读(137) 评论(0) 推荐(0)
摘要:leetcode - Excel Sheet Column NumberRelated to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its correspon... 阅读全文
posted @ 2015-05-13 17:27 cnblogshnj 阅读(134) 评论(0) 推荐(0)
摘要:leetcode - Rotate ArrayRotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated t... 阅读全文
posted @ 2015-05-13 17:08 cnblogshnj 阅读(127) 评论(0) 推荐(0)
摘要:leetcode - Factorial Trailing ZeroesGiven an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time c... 阅读全文
posted @ 2015-05-13 13:20 cnblogshnj 阅读(98) 评论(0) 推荐(0)
摘要:leetcode - Reverse BitsReverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 000000101001010000... 阅读全文
posted @ 2015-05-12 17:43 cnblogshnj 阅读(156) 评论(0) 推荐(0)
摘要:leetcode - Number of 1 BitsWrite a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight... 阅读全文
posted @ 2015-05-12 17:01 cnblogshnj 阅读(129) 评论(0) 推荐(0)
摘要:leetcode - happy numberWrite an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting wi... 阅读全文
posted @ 2015-05-12 16:46 cnblogshnj 阅读(171) 评论(0) 推荐(0)
摘要:leetcode - Remove Linked List Elements 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next;... 阅读全文
posted @ 2015-05-12 12:35 cnblogshnj 阅读(131) 评论(0) 推荐(0)
摘要:leetcode - Isomorphic StringsGiven two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be repl... 阅读全文
posted @ 2015-05-11 16:38 cnblogshnj 阅读(257) 评论(0) 推荐(0)
摘要:leetcode - Reverse Linked List单链表逆置。/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(i... 阅读全文
posted @ 2015-05-08 17:52 cnblogshnj 阅读(115) 评论(0) 推荐(0)