随笔分类 - LeetCode
摘要:Total Accepted:53721Total Submissions:180705Difficulty:EasyWrite a program to find the node at which the intersection of two singly linked lists begin...
阅读全文
摘要:Total Accepted:90247Total Submissions:254602Difficulty:EasyGiven a sorted linked list, delete all duplicates such that each element appear onlyonce.Fo...
阅读全文
摘要:Total Accepted:43183Total Submissions:160460Difficulty:EasyRemove all elements from a linked list of integers that have valueval.ExampleGiven:1 --> 2 ...
阅读全文
摘要:otal Accepted:48115Total Submissions:109291Difficulty:EasyWrite a function to delete a node (except the tail) in a singly linked list, given only acce...
阅读全文
摘要:一.Reverse Linked List(M) Reverse Linked List II(M) Binary Tree Upside Down(E) Palindrome Linked List/** * Definition for singly-linked list. * struct ...
阅读全文
摘要:Total Accepted:84303Total Submissions:302714Difficulty:EasyGiven a linked list, remove thenthnode from the end of list and return its head.For example...
阅读全文
摘要:Total Accepted:98729Total Submissions:261539Difficulty:MediumGiven a binary tree, return theinordertraversal of its nodes' values.For example:Given bi...
阅读全文
摘要:Total Accepted:97599Total Submissions:257736Difficulty:MediumGiven a binary tree, return thepreordertraversal of its nodes' values.For example:Given b...
阅读全文
摘要:Total Accepted:55722Total Submissions:249668Difficulty:MediumEvaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators ...
阅读全文
摘要:Total Accepted:5561Total Submissions:26048Difficulty:HardGiven a string that contains only digits0-9and a target value, return all possibilities to ad...
阅读全文
摘要: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...
阅读全文
摘要:一.Basic CalculatorTotal Accepted:18480Total Submissions:94750Difficulty:MediumImplement a basic calculator to evaluate a simple expression string.The ...
阅读全文
摘要:Total Accepted:57578Total Submissions:226493Difficulty:MediumGiven an array of strings, group anagrams together.For example, given:["eat", "tea", "tan...
阅读全文
摘要:Total Accepted:39335Total Submissions:242429Difficulty:EasyCompare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1v2){ ...
阅读全文
摘要:Total Accepted:63607Total Submissions:237192Difficulty:EasyThe count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211...
阅读全文
摘要: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...
阅读全文
摘要:Total Accepted:76601Total Submissions:288579Difficulty:EasyWrite a function to find the longest common prefix string amongst an array of strings.class...
阅读全文
摘要:Total Accepted:74498Total Submissions:265241Difficulty:EasyGiven a stringsconsists of upper/lower-case alphabets and empty space characters' ', return...
阅读全文
摘要:Shortest PalindromeTotal Accepted:13465Total Submissions:74427Difficulty:HardGiven a string S, you are allowed to convert it to a palindrome by adding...
阅读全文
摘要:Total Accepted:82026Total Submissions:379898Difficulty:MediumGiven a stringS, find the longest palindromic substring inS. You may assume that the maxi...
阅读全文
浙公网安备 33010602011771号