12 2015 档案

摘要:http协议总结 一、www的简单构成: html:文本如何标记 http:文本在不同机子之间如何传输 url:标记如何定位 二、uri和url uri:统一资源标示符,由某种协议表示的资源的定位符,协议可以是http,ftp,mailto,urn。其表示的资源可以是绝对路径也可以是相对路径。其核心 阅读全文
posted @ 2015-12-29 16:26 zengzy 阅读(2040) 评论(1) 推荐(1)
摘要:319. Bulb SwitcherTotal Accepted:976Total Submissions:2611Difficulty:MediumThere arenbulbs that are initially off. You first turn on all the bulbs. Th... 阅读全文
posted @ 2015-12-20 21:05 zengzy 阅读(250) 评论(0) 推荐(1)
摘要:70. Climbing StairsTotal Accepted:84498Total Submissions:237744Difficulty:EasyYou are climbing a stair case. It takesnsteps to reach to the top.Each t... 阅读全文
posted @ 2015-12-20 11:26 zengzy 阅读(219) 评论(2) 推荐(1)
摘要:198. House RobberTotal Accepted:45873Total Submissions:142855Difficulty:EasyYou are a professional robber planning to rob houses along a street. Each ... 阅读全文
posted @ 2015-12-20 11:21 zengzy 阅读(255) 评论(0) 推荐(1)
摘要:303. Range Sum Query - ImmutableTotal Accepted:10632Total Submissions:44726Difficulty:EasyGiven an integer arraynums, find the sum of the elements bet... 阅读全文
posted @ 2015-12-20 10:59 zengzy 阅读(204) 评论(0) 推荐(1)
摘要:89. Gray CodeTotal Accepted:49119Total Submissions:142633Difficulty:MediumThe gray code is a binary numeral system where two successive values differ ... 阅读全文
posted @ 2015-12-20 10:48 zengzy 阅读(200) 评论(0) 推荐(1)
摘要:22. Generate ParenthesesTotal Accepted:70039Total Submissions:203043Difficulty:MediumGivennpairs of parentheses, write a function to generate all comb... 阅读全文
posted @ 2015-12-19 21:34 zengzy 阅读(134) 评论(0) 推荐(0)
摘要:316. Remove Duplicate LettersTotal Accepted:2367Total Submissions:12388Difficulty:MediumGiven a string which contains only lowercase letters, remove d... 阅读全文
posted @ 2015-12-19 20:17 zengzy 阅读(232) 评论(0) 推荐(1)
摘要:155. Min StackTotal Accepted:54402Total Submissions:259750Difficulty:EasyDesign a stack that supports push, pop, top, and retrieving the minimum eleme... 阅读全文
posted @ 2015-12-19 16:50 zengzy 阅读(139) 评论(0) 推荐(1)
摘要:232. Implement Queue using StacksTotal Accepted:27024Total Submissions:79793Difficulty:EasyImplement the following operations of a queue using stacks.... 阅读全文
posted @ 2015-12-19 16:32 zengzy 阅读(159) 评论(0) 推荐(1)
摘要:241. Different Ways to Add ParenthesesTotal Accepted:13500Total Submissions:43882Difficulty:MediumGiven a string of numbers and operators, return all ... 阅读全文
posted @ 2015-12-19 16:07 zengzy 阅读(197) 评论(0) 推荐(0)
摘要:233. Number of Digit OneTotal Accepted:13442Total Submissions:59263Difficulty:MediumGiven an integer n, count the total number of digit 1 appearing in... 阅读全文
posted @ 2015-12-19 14:27 zengzy 阅读(141) 评论(0) 推荐(1)
摘要:Permutation SequenceTotal Accepted:44618Total Submissions:187104Difficulty:MediumThe set[1,2,3,…,n]contains a total ofn! unique permutations.By listin... 阅读全文
posted @ 2015-12-18 23:57 zengzy 阅读(140) 评论(0) 推荐(0)
摘要:Perfect SquaresTotal Accepted:18854Total Submissions:63048Difficulty:MediumGiven a positive integern, find the least number of perfect square numbers ... 阅读全文
posted @ 2015-12-18 19:48 zengzy 阅读(200) 评论(0) 推荐(0)
摘要:Factorial Trailing ZeroesTotal Accepted:44612Total Submissions:144778Difficulty:EasyGiven an integern, return the number of trailing zeroes inn!.Note:... 阅读全文
posted @ 2015-12-18 18:38 zengzy 阅读(132) 评论(0) 推荐(1)
摘要:Excel Sheet Column TitleTotal Accepted:45878Total Submissions:230128Difficulty:EasyGiven a positive integer, return its corresponding column title as ... 阅读全文
posted @ 2015-12-18 18:06 zengzy 阅读(149) 评论(0) 推荐(0)
摘要:Excel Sheet Column NumberTotal Accepted:55771Total Submissions:142875Difficulty:EasyRelated to questionExcel Sheet Column TitleGiven a column title as... 阅读全文
posted @ 2015-12-18 17:03 zengzy 阅读(169) 评论(0) 推荐(1)
摘要:Palindrome NumberTotal Accepted:95552Total Submissions:318732Difficulty:EasyDetermine whether an integer is a palindrome. Do this without extra space.... 阅读全文
posted @ 2015-12-18 16:54 zengzy 阅读(133) 评论(0) 推荐(0)
摘要:Kth Largest Element in an ArrayTotal Accepted:32668Total Submissions:109273Difficulty:MediumFind thekth largest element in an unsorted array. Note tha... 阅读全文
posted @ 2015-12-18 16:39 zengzy 阅读(184) 评论(0) 推荐(0)
摘要:Flatten Binary Tree to Linked ListTotal Accepted:68105Total Submissions:228885Difficulty:MediumGiven a binary tree, flatten it to a linked list in-pla... 阅读全文
posted @ 2015-12-18 15:05 zengzy 阅读(180) 评论(0) 推荐(0)
摘要:Serialize and Deserialize Binary TreeTotal Accepted:6782Total Submissions:27834Difficulty:MediumSerialization is the process of converting a data stru... 阅读全文
posted @ 2015-12-18 14:35 zengzy 阅读(259) 评论(0) 推荐(0)
摘要:Binary Tree Maximum Path SumTotal Accepted:55016Total Submissions:246213Difficulty:HardGiven a binary tree, find the maximum path sum.For this problem... 阅读全文
posted @ 2015-12-18 13:30 zengzy 阅读(130) 评论(0) 推荐(0)
摘要:Binary Tree Postorder TraversalTotal Accepted:82814Total Submissions:244246Difficulty:HardGiven a binary tree, return thepostordertraversal of its nod... 阅读全文
posted @ 2015-12-18 10:28 zengzy 阅读(134) 评论(0) 推荐(0)
摘要:Convert Sorted Array to Binary Search TreeTotal Accepted:61516Total Submissions:173462Difficulty:MediumGiven an array where elements are sorted in asc... 阅读全文
posted @ 2015-12-18 10:08 zengzy 阅读(129) 评论(0) 推荐(0)
摘要:Binary Tree Zigzag Level Order TraversalTotal Accepted:49079Total Submissions:179977Difficulty:MediumGiven a binary tree, return thezigzag level order... 阅读全文
posted @ 2015-12-18 09:57 zengzy 阅读(157) 评论(0) 推荐(0)
摘要:Unique Binary Search TreesTotal Accepted:69271Total Submissions:191174Difficulty:MediumGivenn, how many structurally uniqueBST's(binary search trees) ... 阅读全文
posted @ 2015-12-17 22:10 zengzy 阅读(201) 评论(0) 推荐(0)
摘要:Validate Binary Search TreeTotal Accepted:73179Total Submissions:359616Difficulty:MediumGiven a binary tree, determine if it is a valid binary search ... 阅读全文
posted @ 2015-12-17 21:10 zengzy 阅读(165) 评论(0) 推荐(0)
摘要:Populating Next Right Pointers in Each NodeTotal Accepted:72323Total Submissions:199207Difficulty:MediumGiven a binary tree struct TreeLinkNode { ... 阅读全文
posted @ 2015-12-17 18:36 zengzy 阅读(244) 评论(0) 推荐(0)
摘要:Binary Tree Right Side ViewTotal Accepted:28755Total Submissions:92186Difficulty:MediumGiven a binary tree, imagine yourself standing on therightside ... 阅读全文
posted @ 2015-12-17 18:14 zengzy 阅读(147) 评论(0) 推荐(0)
摘要:Sum Root to Leaf NumbersTotal Accepted:63531Total Submissions:202910Difficulty:MediumGiven a binary tree containing digits from0-9only, each root-to-l... 阅读全文
posted @ 2015-12-17 17:11 zengzy 阅读(246) 评论(0) 推荐(0)
摘要:Binary Search Tree IteratorTotal Accepted:34935Total Submissions:109369Difficulty:MediumImplement an iterator over a binary search tree (BST). Your it... 阅读全文
posted @ 2015-12-17 17:03 zengzy 阅读(138) 评论(0) 推荐(0)
摘要:Binary Tree PathsTotal Accepted:26174Total Submissions:104545Difficulty:EasyGiven a binary tree, return all root-to-leaf paths.For example, given the ... 阅读全文
posted @ 2015-12-17 15:32 zengzy 阅读(186) 评论(0) 推荐(0)
摘要:1、Lowest Common Ancestor of a Binary Search Tree Total Accepted: 42225 Total Submissions: 111243 Difficulty: Easy Given a binary search tree (BST), fi 阅读全文
posted @ 2015-12-17 15:11 zengzy 阅读(186) 评论(0) 推荐(0)
摘要:Invert Binary TreeTotal Accepted:55757Total Submissions:132365Difficulty:EasyInvert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4... 阅读全文
posted @ 2015-12-17 11:44 zengzy 阅读(141) 评论(0) 推荐(0)
摘要:Path SumTotal Accepted:81706Total Submissions:269391Difficulty:EasyGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such t... 阅读全文
posted @ 2015-12-17 11:22 zengzy 阅读(222) 评论(0) 推荐(0)
摘要:Same TreeTotal Accepted:98221Total Submissions:232503Difficulty:EasyGiven two binary trees, write a function to check if they are equal or not.Two bin... 阅读全文
posted @ 2015-12-17 11:00 zengzy 阅读(144) 评论(0) 推荐(0)
摘要:Symmetric TreeTotal Accepted:84678Total Submissions:259420Difficulty:EasyGiven a binary tree, check whether it is a mirror of itself (ie, symmetric ar... 阅读全文
posted @ 2015-12-17 10:45 zengzy 阅读(138) 评论(0) 推荐(0)
摘要:Binary Tree Level Order TraversalTotal Accepted:79463Total Submissions:259292Difficulty:EasyGiven a binary tree, return thelevel ordertraversal of its... 阅读全文
posted @ 2015-12-17 10:00 zengzy 阅读(414) 评论(0) 推荐(0)
摘要:Minimum Depth of Binary TreeTotal Accepted:84038Total Submissions:283068Difficulty:EasyGiven a binary tree, find its minimum depth.The minimum depth i... 阅读全文
posted @ 2015-12-17 09:40 zengzy 阅读(155) 评论(0) 推荐(0)
摘要:Maximum Depth of Binary TreeTotal Accepted:107337Total Submissions:231121Difficulty:EasyGiven a binary tree, find its maximum depth.The maximum depth ... 阅读全文
posted @ 2015-12-17 09:30 zengzy 阅读(127) 评论(0) 推荐(0)
摘要:Balanced Binary TreeTotal Accepted:86508Total Submissions:263690Difficulty:EasyGiven a binary tree, determine if it is height-balanced.For this proble... 阅读全文
posted @ 2015-12-17 09:25 zengzy 阅读(167) 评论(0) 推荐(0)
摘要:Bitwise AND of Numbers RangeTotal Accepted:24968Total Submissions:89204Difficulty:MediumGiven a range [m, n] where 0 >= 1 ; n >>= 1 ; ... 阅读全文
posted @ 2015-12-16 23:34 zengzy 阅读(134) 评论(0) 推荐(0)
摘要:Maximum Product of Word LengthsTotal Accepted:750Total Submissions:2060Difficulty:MediumGiven a string arraywords, find the maximum value oflength(wor... 阅读全文
posted @ 2015-12-16 21:38 zengzy 阅读(311) 评论(0) 推荐(0)
摘要:Power of TwoTotal Accepted:43421Total Submissions:130315Difficulty:EasyGiven an integer, write a function to determine if it is a power of two.class S... 阅读全文
posted @ 2015-12-16 21:01 zengzy 阅读(125) 评论(0) 推荐(0)
摘要:Reverse BitsTotal Accepted:45982Total Submissions:157761Difficulty:EasyReverse bits of a given 32 bits unsigned integer.For example, given input 43261... 阅读全文
posted @ 2015-12-16 20:53 zengzy 阅读(133) 评论(0) 推荐(0)
摘要:Number of 1 BitsTotal Accepted:64907Total Submissions:171590Difficulty:EasyWrite a function that takes an unsigned integer and returns the number of ’... 阅读全文
posted @ 2015-12-16 20:42 zengzy 阅读(119) 评论(0) 推荐(0)
摘要:Single NumberTotal Accepted:103745Total Submissions:218647Difficulty:MediumGiven an array of integers, every element appearstwiceexcept for one. Find ... 阅读全文
posted @ 2015-12-16 19:40 zengzy 阅读(241) 评论(0) 推荐(0)
摘要:Total Accepted:32259Total Submissions:142733Difficulty:MediumAll DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example... 阅读全文
posted @ 2015-12-16 19:36 zengzy 阅读(153) 评论(0) 推荐(0)
摘要:Total Accepted:23332Total Submissions:166240Difficulty:MediumGiven two integers representing the numerator and denominator of a fraction, return the f... 阅读全文
posted @ 2015-12-16 19:14 zengzy 阅读(214) 评论(0) 推荐(0)
摘要:Total Accepted:38651Total Submissions:141668Difficulty:EasyGiven two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the ... 阅读全文
posted @ 2015-12-16 17:20 zengzy 阅读(189) 评论(0) 推荐(0)
摘要:Total Accepted:57185Total Submissions:199536Difficulty:EasyDetermine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board co... 阅读全文
posted @ 2015-12-16 16:57 zengzy 阅读(148) 评论(0) 推荐(0)
摘要:Total Accepted:43534Total Submissions:196140Difficulty:EasyDescription:Count the number of prime numbers less than a non-negative number,n.class Solut... 阅读全文
posted @ 2015-12-16 15:32 zengzy 阅读(134) 评论(0) 推荐(0)
摘要:Total Accepted:11158Total Submissions:42823Difficulty:EasyYou are playing the followingBulls and Cowsgame with your friend: You write down a number an... 阅读全文
posted @ 2015-12-16 13:27 zengzy 阅读(286) 评论(0) 推荐(0)
摘要:Total Accepted:18003Total Submissions:66490Difficulty:EasyGiven apatternand a stringstr, find ifstrfollows the same pattern.Herefollowmeans a full mat... 阅读全文
posted @ 2015-12-16 12:58 zengzy 阅读(273) 评论(0) 推荐(0)
摘要:Total Accepted:49916Total Submissions:365731Difficulty:HardGivennpoints on a 2D plane, find the maximum number of points that lie on the same straight... 阅读全文
posted @ 2015-12-16 11:38 zengzy 阅读(149) 评论(0) 推荐(0)
摘要:Total Accepted:26010Total Submissions:102064Difficulty:HardGiven an unsorted array, find the maximum difference between the successive elements in its... 阅读全文
posted @ 2015-12-15 21:01 zengzy 阅读(207) 评论(0) 推荐(1)
摘要:Longest Increasing SubsequenceTotal Accepted:9797Total Submissions:30801Difficulty:MediumGiven an unsorted array of integers, find the length of longe... 阅读全文
posted @ 2015-12-15 17:19 zengzy 阅读(168) 评论(0) 推荐(0)
摘要:Total Accepted:28176Total Submissions:82688Difficulty:MediumGiven a binary search tree, write a functionkthSmallestto find thekth smallest element in ... 阅读全文
posted @ 2015-12-15 15:57 zengzy 阅读(122) 评论(0) 推荐(1)
摘要: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 阅读(200) 评论(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)
摘要: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)
摘要:一.Linked List CycleTotal Accepted:85115Total Submissions:232388Difficulty:MediumGiven a linked list, determine if it has a cycle in it.Follow up:Can y... 阅读全文
posted @ 2015-12-12 11:48 zengzy 阅读(172) 评论(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:29652Total Submissions:117516Difficulty:EasyGiven a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(... 阅读全文
posted @ 2015-12-12 10:11 zengzy 阅读(191) 评论(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)
摘要:Total Accepted:55559Total Submissions:331659Difficulty:MediumA message containing letters fromA-Zis being encoded to numbers using the following mappi... 阅读全文
posted @ 2015-12-11 18:09 zengzy 阅读(138) 评论(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)
摘要:一.两个难点算法1.Manacher算法,线性时间求最长回文子串2.KMP算法,字符串匹配问题,c语言中的strStr二.几个题目1.最长回文子串方法:暴力,动态规划,中心扩展,manacher参考:http://blog.163.com/zhaohai_1988/blog/static/20951... 阅读全文
posted @ 2015-12-07 21:14 zengzy 阅读(314) 评论(0) 推荐(0)
摘要:Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Subscribeto see which comp... 阅读全文
posted @ 2015-12-07 19:59 zengzy 阅读(182) 评论(0) 推荐(0)
摘要:32. Longest Valid ParenthesesGiven a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses su... 阅读全文
posted @ 2015-12-07 19:31 zengzy 阅读(142) 评论(0) 推荐(0)
摘要:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2015-12-07 18:07 zengzy 阅读(148) 评论(0) 推荐(0)
摘要:一.SubsetsGiven a set of distinct integers,nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set... 阅读全文
posted @ 2015-12-06 22:22 zengzy 阅读(191) 评论(0) 推荐(0)
摘要:A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ... 阅读全文
posted @ 2015-12-06 22:19 zengzy 阅读(188) 评论(0) 推荐(0)
摘要:Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon... 阅读全文
posted @ 2015-12-06 22:17 zengzy 阅读(264) 评论(0) 推荐(0)
摘要:Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2... 阅读全文
posted @ 2015-12-06 22:04 zengzy 阅读(253) 评论(0) 推荐(0)
摘要:一.Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.罗马数字是阿拉伯数字传入之前使用的一种数码。罗马数字... 阅读全文
posted @ 2015-12-06 19:53 zengzy 阅读(200) 评论(0) 推荐(0)
摘要:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C prog... 阅读全文
posted @ 2015-12-06 19:02 zengzy 阅读(222) 评论(0) 推荐(0)
摘要:Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The... 阅读全文
posted @ 2015-12-06 15:53 zengzy 阅读(168) 评论(0) 推荐(0)
摘要:Implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters (including the e... 阅读全文
posted @ 2015-12-04 13:37 zengzy 阅读(429) 评论(0) 推荐(1)
摘要:Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ... 阅读全文
posted @ 2015-12-04 12:59 zengzy 阅读(148) 评论(0) 推荐(0)
摘要:Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem stat... 阅读全文
posted @ 2015-12-04 12:37 zengzy 阅读(206) 评论(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-12-03 16:46 zengzy 阅读(211) 评论(0) 推荐(0)
摘要:There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should... 阅读全文
posted @ 2015-12-02 17:10 zengzy 阅读(169) 评论(0) 推荐(0)
摘要:Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree./** * Definiti... 阅读全文
posted @ 2015-12-01 00:27 zengzy 阅读(170) 评论(0) 推荐(0)
摘要:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree./** * Definitio... 阅读全文
posted @ 2015-12-01 00:17 zengzy 阅读(150) 评论(0) 推荐(0)

levels of contents