随笔分类 -  leedcode

上一页 1 ··· 8 9 10 11 12
摘要:/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; } * } */public... 阅读全文
posted @ 2015-04-30 21:45 ~每天进步一点点~ 阅读(99) 评论(0) 推荐(0)
摘要:Description:Count the number of prime numbers less than a non-negative number,npublic class Solution { public int countPrimes(int n) { if(n(... 阅读全文
posted @ 2015-04-30 21:44 ~每天进步一点点~ 阅读(173) 评论(0) 推荐(0)
摘要:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu... 阅读全文
posted @ 2015-04-06 22:09 ~每天进步一点点~ 阅读(121) 评论(0) 推荐(0)
摘要:Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace... 阅读全文
posted @ 2015-04-06 20:04 ~每天进步一点点~ 阅读(524) 评论(0) 推荐(0)
摘要:Sort a linked list inO(nlogn) time using constant space complexity./** * Definition for singly-linked list. * struct ListNode { * int val; * L... 阅读全文
posted @ 2015-04-05 22:23 ~每天进步一点点~ 阅读(177) 评论(0) 推荐(0)
摘要:Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.class Solution {public: ... 阅读全文
posted @ 2015-04-05 21:13 ~每天进步一点点~ 阅读(136) 评论(0) 推荐(0)
摘要:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana... 阅读全文
posted @ 2015-04-05 16:57 ~每天进步一点点~ 阅读(97) 评论(0) 推荐(0)
摘要:Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ... 阅读全文
posted @ 2015-04-05 15:15 ~每天进步一点点~ 阅读(139) 评论(0) 推荐(0)

上一页 1 ··· 8 9 10 11 12