随笔分类 -  LeetCode

摘要:1.H-IndexTotal Accepted:19058Total Submissions:70245Difficulty:MediumGiven an array of citations (each citation is a non-negative integer) of a resear... 阅读全文
posted @ 2015-12-15 11:56 zengzy 阅读(234) 评论(0) 推荐(1)
摘要:Total Accepted:35377Total Submissions:202492Difficulty:MediumGiven a list of non negative integers, arrange them such that they form the largest numbe... 阅读全文
posted @ 2015-12-15 10:04 zengzy 阅读(187) 评论(0) 推荐(1)
摘要:Total Accepted:43676Total Submissions:111568Difficulty:EasyGiven two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "... 阅读全文
posted @ 2015-12-14 18:20 zengzy 阅读(116) 评论(0) 推荐(0)
摘要:Total Accepted:22338Total Submissions:97234Difficulty:MediumGiven acompletebinary tree, count the number of nodes.Definition of a complete binary tree... 阅读全文
posted @ 2015-12-14 11:33 zengzy 阅读(161) 评论(0) 推荐(0)
摘要:Total Accepted:75767Total Submissions:314003Difficulty:MediumImplementint sqrt(int x).Compute and return the square root ofx.(M) Pow(x, n)class Soluti... 阅读全文
posted @ 2015-12-13 23:49 zengzy 阅读(240) 评论(0) 推荐(0)
摘要:Total Accepted:73922Total Submissions:269855Difficulty:MediumImplement pow(x,n).(M) Sqrt(x)1.递归/*n = 0, 0x = 0 ,x>0,x>1) ; res = res * res; ... 阅读全文
posted @ 2015-12-13 22:34 zengzy 阅读(205) 评论(0) 推荐(0)
摘要:otal Accepted:54356Total Submissions:357733Difficulty:MediumDivide two integers without using multiplication, division and mod operator.If it is overf... 阅读全文
posted @ 2015-12-13 20:45 zengzy 阅读(247) 评论(0) 推荐(0)
摘要:Total Accepted:111287Total Submissions:474471Difficulty:EasyReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321cli... 阅读全文
posted @ 2015-12-13 19:30 zengzy 阅读(147) 评论(0) 推荐(0)
摘要:Total Accepted:48185Total Submissions:241794Difficulty:HardGiven a string S and a string T, find the minimum window in S which will contain all the ch... 阅读全文
posted @ 2015-12-13 19:09 zengzy 阅读(222) 评论(0) 推荐(0)
摘要:Total Accepted:45534Total Submissions:226763Difficulty:HardYou are given a string,s, and a list of words,words, that are all of the same length. Find ... 阅读全文
posted @ 2015-12-13 13:58 zengzy 阅读(181) 评论(0) 推荐(0)
摘要:Total Accepted:53943Total Submissions:209664Difficulty:HardA linked list is given such that each node contains an additional random pointer which coul... 阅读全文
posted @ 2015-12-13 10:26 zengzy 阅读(225) 评论(0) 推荐(0)
摘要:Total Accepted:53879Total Submissions:190701Difficulty:MediumGiven a linked list and a valuex, partition it such that all nodes less thanxcome before ... 阅读全文
posted @ 2015-12-12 22:24 zengzy 阅读(268) 评论(0) 推荐(0)
摘要:Total Accepted:57775Total Submissions:198972Difficulty:MediumGiven a singly linked list where elements are sorted in ascending order, convert it to a ... 阅读全文
posted @ 2015-12-12 20:54 zengzy 阅读(137) 评论(0) 推荐(0)
摘要:otal Accepted:54991Total Submissions:252600Difficulty:MediumGiven a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must ... 阅读全文
posted @ 2015-12-12 20:06 zengzy 阅读(188) 评论(0) 推荐(0)
摘要:Total Accepted:59422Total Submissions:213019Difficulty:MediumSort a linked list using insertion sort.(M) Sort List/** * Definition for singly-linked l... 阅读全文
posted @ 2015-12-12 19:29 zengzy 阅读(194) 评论(0) 推荐(0)
摘要:Total Accepted: 59433 Total Submissions: 230628 Difficulty: Medium Given a sorted linked list, delete all nodes that have duplicate numbers, leaving o 阅读全文
posted @ 2015-12-12 18:35 zengzy 阅读(165) 评论(0) 推荐(0)
摘要:otal Accepted:59473Total Submissions:253637Difficulty:MediumSort a linked list inO(nlogn) time using constant space complexity.(E) Merge Two Sorted Li... 阅读全文
posted @ 2015-12-12 16:59 zengzy 阅读(199) 评论(0) 推荐(0)
摘要:Total Accepted:55428Total Submissions:250727Difficulty:MediumGiven a list, rotate the list to the right bykplaces, wherekis non-negative.For example:G... 阅读全文
posted @ 2015-12-12 16:36 zengzy 阅读(185) 评论(0) 推荐(0)
摘要:Total Accepted:48614Total Submissions:185356Difficulty:HardGiven a linked list, reverse the nodes of a linked listkat a time and return its modified l... 阅读全文
posted @ 2015-12-12 16:01 zengzy 阅读(181) 评论(0) 推荐(0)
摘要:Total Accepted:73777Total Submissions:219963Difficulty:MediumGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1... 阅读全文
posted @ 2015-12-12 15:29 zengzy 阅读(183) 评论(0) 推荐(0)

levels of contents