随笔分类 -  LeetCode

摘要:Total Accepted:53721Total Submissions:180705Difficulty:EasyWrite a program to find the node at which the intersection of two singly linked lists begin... 阅读全文
posted @ 2015-12-12 15:12 zengzy 阅读(201) 评论(0) 推荐(0)
摘要:Total Accepted:90247Total Submissions:254602Difficulty:EasyGiven a sorted linked list, delete all duplicates such that each element appear onlyonce.Fo... 阅读全文
posted @ 2015-12-12 15:03 zengzy 阅读(133) 评论(0) 推荐(0)
摘要:Total Accepted:43183Total Submissions:160460Difficulty:EasyRemove all elements from a linked list of integers that have valueval.ExampleGiven:1 --> 2 ... 阅读全文
posted @ 2015-12-12 14:58 zengzy 阅读(140) 评论(0) 推荐(0)
摘要:otal Accepted:48115Total Submissions:109291Difficulty:EasyWrite a function to delete a node (except the tail) in a singly linked list, given only acce... 阅读全文
posted @ 2015-12-12 14:48 zengzy 阅读(137) 评论(0) 推荐(0)
摘要:一.Reverse Linked List(M) Reverse Linked List II(M) Binary Tree Upside Down(E) Palindrome Linked List/** * Definition for singly-linked list. * struct ... 阅读全文
posted @ 2015-12-12 10:14 zengzy 阅读(194) 评论(0) 推荐(0)
摘要:Total Accepted:84303Total Submissions:302714Difficulty:EasyGiven a linked list, remove thenthnode from the end of list and return its head.For example... 阅读全文
posted @ 2015-12-12 09:37 zengzy 阅读(177) 评论(0) 推荐(0)
摘要:Total Accepted:98729Total Submissions:261539Difficulty:MediumGiven a binary tree, return theinordertraversal of its nodes' values.For example:Given bi... 阅读全文
posted @ 2015-12-12 01:19 zengzy 阅读(163) 评论(0) 推荐(0)
摘要:Total Accepted:97599Total Submissions:257736Difficulty:MediumGiven a binary tree, return thepreordertraversal of its nodes' values.For example:Given b... 阅读全文
posted @ 2015-12-12 01:14 zengzy 阅读(151) 评论(0) 推荐(0)
摘要:Total Accepted:55722Total Submissions:249668Difficulty:MediumEvaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators ... 阅读全文
posted @ 2015-12-12 01:05 zengzy 阅读(170) 评论(0) 推荐(0)
摘要:Total Accepted:5561Total Submissions:26048Difficulty:HardGiven a string that contains only digits0-9and a target value, return all possibilities to ad... 阅读全文
posted @ 2015-12-11 23:58 zengzy 阅读(345) 评论(0) 推荐(0)
摘要:Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"click to show corner cas... 阅读全文
posted @ 2015-12-11 20:02 zengzy 阅读(154) 评论(0) 推荐(0)
摘要:一.Basic CalculatorTotal Accepted:18480Total Submissions:94750Difficulty:MediumImplement a basic calculator to evaluate a simple expression string.The ... 阅读全文
posted @ 2015-12-10 20:19 zengzy 阅读(175) 评论(0) 推荐(0)
摘要:Total Accepted:57578Total Submissions:226493Difficulty:MediumGiven an array of strings, group anagrams together.For example, given:["eat", "tea", "tan... 阅读全文
posted @ 2015-12-10 18:46 zengzy 阅读(262) 评论(0) 推荐(0)
摘要:Total Accepted:39335Total Submissions:242429Difficulty:EasyCompare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1v2){ ... 阅读全文
posted @ 2015-12-10 16:36 zengzy 阅读(185) 评论(0) 推荐(0)
摘要:Total Accepted:63607Total Submissions:237192Difficulty:EasyThe count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211... 阅读全文
posted @ 2015-12-10 13:44 zengzy 阅读(162) 评论(0) 推荐(0)
摘要:Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231- 1.For example,123 -> "One Hundred T... 阅读全文
posted @ 2015-12-10 13:17 zengzy 阅读(147) 评论(0) 推荐(0)
摘要:Total Accepted:76601Total Submissions:288579Difficulty:EasyWrite a function to find the longest common prefix string amongst an array of strings.class... 阅读全文
posted @ 2015-12-10 09:17 zengzy 阅读(197) 评论(0) 推荐(0)
摘要:Total Accepted:74498Total Submissions:265241Difficulty:EasyGiven a stringsconsists of upper/lower-case alphabets and empty space characters' ', return... 阅读全文
posted @ 2015-12-10 08:58 zengzy 阅读(130) 评论(0) 推荐(0)
摘要:Shortest PalindromeTotal Accepted:13465Total Submissions:74427Difficulty:HardGiven a string S, you are allowed to convert it to a palindrome by adding... 阅读全文
posted @ 2015-12-09 22:10 zengzy 阅读(169) 评论(0) 推荐(0)
摘要:Total Accepted:82026Total Submissions:379898Difficulty:MediumGiven a stringS, find the longest palindromic substring inS. You may assume that the maxi... 阅读全文
posted @ 2015-12-07 22:04 zengzy 阅读(157) 评论(0) 推荐(0)

levels of contents