- 博客(49)
- 收藏
- 关注
原创 leetcode 038 Count and Say
The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, …
2016-05-19 22:11:27 515
原创 leetcode 036 Valid Sudoku
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled with the character '.'.
2016-05-06 20:25:13 718
原创 leetcode 035 Search Insert Position
题目Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the array.
2016-05-04 14:11:49 361
原创 leetcode 034 Search For A Range
题目Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm’s runtime complexity must be in the order of O(logn)O(\log n). If the target is not f
2016-05-03 22:56:21 368
原创 leetcode 033 Search in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
2016-05-02 21:38:30 325
原创 leetcode 032 Longest Valid Parentheses
Given a string containing just the characters'(' and ')', find the length of the longest valid (well-formed) parentheses substring.
2016-04-28 23:53:48 314
原创 leetcode 031 Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possibl
2016-04-26 20:40:29 250
原创 Chrome无法用xsl显示xml文档
今天在做一个xml的小试验时,发现Chrome竟然无法显示经过xsl修饰的文档!!这么高级的浏览器不应该存在这样的情况啊。经过一翻折腾加google后,发现确实是因为Chrome太高级了所以无法显示:因为安全机制,Chrome不允许本地的xml访问本地的xsl。
2016-04-25 22:43:12 7090
原创 leetcode 029 Divide Two Integers
Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT.
2016-04-23 22:19:15 387
原创 leetcode 28 Implement strStr()
Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
2016-04-15 21:59:12 338
原创 leetcode 27 Romove Element
27. Romove Element Given an array and a value, remove all instances of that value in place and return the new length.
2016-04-14 22:09:33 281
原创 leetcode 26 Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
2016-04-13 23:05:11 222
原创 leetcode 25 Reverse Nodes in k-Group
25. Reverse Nodes in k-Group Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
2016-04-13 01:15:21 258
原创 leetcode 24 Swap Nodes in Pairs
题目24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should us
2016-04-11 22:46:44 251
原创 leetcode 23 Merge k Sorted Lists
23. Merge k Sorted Lists Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
2016-04-11 00:39:50 274
原创 leetcode 022 Generate Parentheses
Generate Parentheses Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
2016-04-08 00:48:18 326
原创 leetcode 021 Merge Two Sorted Lists
Merge Two Sorted Lists 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.
2016-04-06 00:33:18 277
原创 leetcode020 Valid Parentheses
Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.
2016-04-04 21:27:11 343
原创 leetcode019 Remove Nth Node From End of List
题目19. Remove Nth Node From End of List Given a linked list, remove the nth node from the end of list and return its head. For example,Given linked list: 1->2->3->4->5, and n = 2.After removing the
2016-04-02 00:43:53 302
原创 leetcode018 Four Sum
题目18. 4 Sum Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: - E
2016-03-31 22:28:45 393
原创 leetcode017 Letter Combinations of a Phone Number
Letter Combinations of a Phone Number Given a digit string, return all possible letter combinations that the number could represent.
2016-03-30 23:43:30 272
原创 leetcode016 3Sum Closest
题目16. 3Sum Closest Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input
2016-03-29 01:22:21 328
原创 leetcode015 3Sum
题目15. 3 Sum Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: - Elements in a triplet
2016-03-24 00:22:07 309
原创 leetcode014 Longest Common Prefix
14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings.
2016-03-22 23:49:10 305
原创 leetcode013 Roman to Integer
题目13. Roman to Integer Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999.
2016-03-21 22:00:49 233
原创 leetcode012 Integer to Roman
12. Integer to Roman Given an integer, convert it to a roman numeral.
2016-03-20 23:03:27 239
原创 leetcode011 Container With Most Water
题目11. Container With Most Water 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
2016-03-20 01:18:08 279
原创 leetcode009 Palindrome Number
题目9. Palindrome Number Determine whether an integer is a palindrome. Do this without extra space.
2016-03-17 01:14:14 242
原创 leetcode008 String to Integer (atoi)
题目8. String to Integer (atoi) Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself wh
2016-03-16 00:12:36 282
原创 leetcode007 Reverse Integer
题目7. Reverse Integer Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321
2016-03-14 23:43:48 269
原创 leetcode006 ZigZag Conversion
题目6. ZigZag Conversion The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P
2016-03-14 13:33:33 295
原创 leetcode005 Longest Palindromic Substring
题目 5. Longest Palindromic SubstringGiven a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic su
2016-03-14 00:30:53 279
原创 leetcode004 Median of Two Sorted Arrays
题目4. Median of Two Sorted Arrays There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+
2016-03-14 00:29:39 354
原创 leetcode003 Longest Substring Without Repeating Characters
题目3. Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters
2016-03-14 00:28:43 333
原创 leetcode002 Add Two Numbers
题目2. Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers an
2016-03-14 00:27:11 312
原创 leetcode001 TwoSum
题目1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution.Example:Given num
2016-03-14 00:25:39 316
转载 在YouCompleteMe+Syntastic中添加和取消对C++11的支持
添加对c++11的支持:/.vimrc中添加: let g:syntastic_cpp_compiler = ‘g++‘ "change the compiler to g++ to support c++11. let g:syntastic_cpp_compiler_options = ‘-std=c++11 -stdlib=libc++‘ "set the opt
2015-11-28 21:43:22 2020
转载 修改MYSQL默认编码为UTF8
原文地址:http://blog.chinaunix.net/uid-10697776-id-2935588.htmlMySQL的默认编码是Latin1,不支持中文,那么如何修改MySQL的默认编码呢,下面以UTF-8为例来说明需要注意的是,要修改的地方非常多,相应的修改方法也很多。下面是一种最简单最彻底的方法:一、Windows1、中止MySQL服务2、在My
2015-11-19 17:19:42 464
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人