- 博客(19)
- 资源 (4)
- 问答 (1)
- 收藏
- 关注
原创 Swap Nodes in Pairs(反转链表相邻两个节点)leetcode24
Given a linked list, swap every two adjacent nodes and return its head.Example:Given 1->2->3->4->5->6, you should return the list as 2->1->4->3->6->5.Note:Your algorithm ...
2018-05-31 23:06:04 278
原创 Merge k Sorted Lists(合并k个有序链表)leetcode23
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example:Input:[ 1->4->5, 1->3->4, 2->6]Output: 1->1->2->3->4->4...
2018-05-31 00:15:38 771
原创 Generate Parentheses(左右括号的全排列)leetcode22
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:[ "((()))", "(()())", "(())()", "()(())", "...
2018-05-30 00:51:50 410
原创 Merge Two Sorted Lists(合并有序链表)leetcode21
code1:(常规解法)public ListNode mergeTwoLists(ListNode l1, ListNode l2) { if(l1==null) return l2; if(l2==null) return l1; ListNode head=null; ListNo...
2018-05-28 22:26:47 246
原创 Valid Parentheses(左右小括号中括号大括号匹配)leetcode20
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type of brack...
2018-05-27 21:50:28 282
原创 Remove Nth Node From End of List(删除链表的倒数第n个节点)leetcode19
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 removing the second node from the end, the li...
2018-05-26 22:05:36 145
原创 4Sum(4个数的和为target的集合)leetcode18
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 quadruplets in the array which gives the sum of tar...
2018-05-25 22:54:58 237
原创 Letter Combinations of a Phone Number(键盘字符的组合)leetcode17
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given...
2018-05-24 22:57:46 207
原创 3Sum Closest(最接近target的三个数字的和)leetcode16
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 three integers. You may assume that each input would ...
2018-05-23 23:10:23 204
原创 3Sum(在一个数组中找到三个数字的和为0不重复)leetcode15
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution set must not contain ...
2018-05-22 23:52:44 621
原创 Longest Common Prefix(字符串数组的最长前缀)leetcode14
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 "".Example 1:Input: ["flower","flow","flight"]Output: "fl"E...
2018-05-21 22:56:48 322
原创 Roman to Integer(罗马数转为整数)leetcode13
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D 5...
2018-05-20 23:48:22 107
原创 Integer to Roman(整型转为罗马数)leetcode12
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D 5...
2018-05-20 00:09:46 644
原创 Container With Most Water (最大盛水量)leetcode11
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two ...
2018-05-19 00:01:37 1725
原创 Regular Expression Matching(正则表达式匹配) leetcode10
Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The...
2018-05-18 00:59:44 201
原创 Palindrome Number(判断一个整数是否是回文串) leetcode9
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: falseExplanation: F...
2018-05-16 23:24:53 1000
原创 String to Integer (atoi) leetcode8
Implement atoi which converts a string to an integer.The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this ...
2018-05-16 00:23:07 165
原创 整形数字反转 leetcode7
example1:input:123output:321example2:input:-123output:-321example3:input:230output:32主要注意整型数字反转后超出范围code1:public int reverse(int x) { String s=x+""; char[] ss=s.toCharArray();...
2018-05-15 00:03:31 294
fdk-aac压缩文件
2017-09-19
ndk编译ffmpeg的shell脚本
2017-09-13
ndk编译ffmpeg修改后的configure文件
2017-09-13
hashmap的一些问题解析
2017-08-28
TA创建的收藏夹 TA关注的收藏夹
TA关注的人