摘要: 题目 Given a sorted array nums, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra 阅读全文
posted @ 2019-06-09 15:00 风雪初晴,宜下江南 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal 阅读全文
posted @ 2019-06-09 14:59 风雪初晴,宜下江南 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a linked list, swap every two adjacent nodes and return its head. You may not modify the values in the list's nodes, only nodes itself may be 阅读全文
posted @ 2019-06-09 14:57 风雪初晴,宜下江南 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 题目 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: & 8195;Input: & 8195;[ & 8195;& 8195;1 阅读全文
posted @ 2019-06-09 14:56 风雪初晴,宜下江南 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 题目 Given n pairs of parentheses, write a function to generate all combinations of well formed parentheses. For example, given n=3 , a solution set is: 阅读全文
posted @ 2019-06-09 14:53 风雪初晴,宜下江南 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Examp 阅读全文
posted @ 2019-06-09 14:52 风雪初晴,宜下江南 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a string containing just the characters '(',')','[',']','{' and ‘}’,determine if the input string is valid. An input string is valid if: 1.Op 阅读全文
posted @ 2019-06-09 14:51 风雪初晴,宜下江南 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a linked list, remove the n th node from the end of list and return its head. Example: Given linked list : 1 2 3 4 5, and n = 2. After removi 阅读全文
posted @ 2019-06-09 14:50 风雪初晴,宜下江南 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 题目 Given an array nums of n integers and an integer target, are there elements a, b, c and d in nums such that a+ b + c + d = target ? Find all unique 阅读全文
posted @ 2019-06-09 14:50 风雪初晴,宜下江南 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a string containing digits from 2 9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to 阅读全文
posted @ 2019-06-09 14:48 风雪初晴,宜下江南 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 题目 Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the 阅读全文
posted @ 2019-06-09 14:47 风雪初晴,宜下江南 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 题目 Given an array nums of n integers, are three elements a, b, c in nums such that a+b+c=0? Find all unique triplets in the array which gives the sum 阅读全文
posted @ 2019-06-09 14:46 风雪初晴,宜下江南 阅读(1528) 评论(0) 推荐(0) 编辑
摘要: 题目 Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix,return an empty string "". Exam 阅读全文
posted @ 2019-06-09 14:43 风雪初晴,宜下江南 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 思路 在进行罗马数字转化为整数的过程中,由于罗马数字是按照从左往右从大到小的顺 阅读全文
posted @ 2019-06-09 14:40 风雪初晴,宜下江南 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目 Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. Symol|Value : :|: : I|1 V|5 X|10 L|50 C 阅读全文
posted @ 2019-06-09 14:39 风雪初晴,宜下江南 阅读(467) 评论(0) 推荐(0) 编辑
摘要: 题目 Given $n$ non negative integers $a_1,a_2,\cdots,a_n$, where each represents a point at coordinate$(i,a_i)$,$n$ vetical lines are drawn such that th 阅读全文
posted @ 2019-06-09 14:36 风雪初晴,宜下江南 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 题目 Given an input string(s) and a pattern(p), implement regular expression matching with support for '.' and ' '. & 8195; '.' Matches any single chara 阅读全文
posted @ 2019-06-09 14:35 风雪初晴,宜下江南 阅读(691) 评论(0) 推荐(0) 编辑
摘要: 题目 Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example1: & 8195; Input:121 & 阅读全文
posted @ 2019-06-09 14:34 风雪初晴,宜下江南 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 题目 Inplement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non wh 阅读全文
posted @ 2019-06-09 14:33 风雪初晴,宜下江南 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a 32 bit signed integer, reverse digits of an integer. Example1: x = 123, return 321 Example2: x = 123,return 321 Example3: x = 120, return 2 阅读全文
posted @ 2019-06-09 14:32 风雪初晴,宜下江南 阅读(211) 评论(0) 推荐(0) 编辑