- 博客(24)
- 资源 (7)
- 收藏
- 关注
转载 (转载) IO - 同步,异步,阻塞,非阻塞 (亡羊补牢篇)
当你发现自己最受欢迎的一篇blog其实大错特错时,这绝对不是一件让人愉悦的事。《 IO - 同步,异步,阻塞,非阻塞 》是我在开始学习epoll和libevent的时候写的,主要的思路来自于文中的那篇link。写完之后发现很多人都很喜欢,我还是非常开心的,也说明这个问题确实困扰了很多人。随着学习的深入,渐渐的感觉原来的理解有些偏差,但是还是没引起自己的重视,觉着都是一些小错误,无伤大雅。直到有
2015-01-25 07:54:28 824 1
原创 LeetCode(179) Largest Number
题目如下:Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.Note: The result ma
2015-01-21 15:58:05 3500
原创 LeetCode(154) Find Minimum in Rotated Sorted Array II
题目如下:Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Suppose a sorted array is rotated at some pivo
2015-01-21 09:10:48 1428
原创 LeetCode(153)Find Minimum in Rotated Sorted Array
题目如下:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no duplicate exist
2015-01-21 06:04:50 2784 2
原创 LeetCode(115) Distinct Subsequences
题目如下:Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original string by deleting some (can
2015-01-21 04:02:50 3744 1
原创 LeetCode(135) Candy
题目如下:There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at l
2015-01-20 10:40:23 2285
原创 LeetCode(127) Word Ladder
题目如下:Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter can be changed at a timeEach intermedia
2015-01-19 04:21:19 786
原创 LeetCode(45) Jump Game II
题目如下:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Your
2015-01-16 17:37:29 1799
原创 LeetCode(55) Jump Game
题目如下:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Dete
2015-01-16 17:33:58 759
原创 LeetCode(57) SpiralMatrix II
题目如下:Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the following matrix:[ [ 1, 2, 3 ], [ 8,
2015-01-14 15:32:53 764
原创 LeetCode(80) Remove Duplicates From Sorted Array II
题目如下:Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array A = [1,1,1,2,2,3],Your function should return length = 5, and A is now
2015-01-11 03:55:11 1883
原创 LeetCode(10) Regular Expression Matching
题目如下:'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire input string (not partial).The function prototype should be:b
2015-01-10 03:37:37 1084
原创 LeetCode(166) Fraction to Recurring Decimal
题目如下:Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating, enclose the repeating part in parenthe
2015-01-09 14:16:29 2914
原创 LeetCode(9) Palindrome Number
题目如下:Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of
2015-01-08 12:56:34 1413
原创 LeetCode(8) String To Integer(atoi)
题目如下:String to Integer (atoi) Total Accepted: 29609 Total Submissions: 214853 My Submissions Question Solution Implement atoi to convert a string to an integer.Hint: Carefully consider all pos
2015-01-08 12:52:36 2504 1
原创 LeetCode(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 A H N
2015-01-06 10:23:04 1023
原创 LeetCode(43) Multiply Strings
题目如下:Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-negative.分析如下:以 1234 * 567 = 69978为
2015-01-06 07:09:48 772
原创 LeetCode(44) Wildcard Matching
题目如下:'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching should cover the entire input string (not partial).The function pro
2015-01-04 15:26:39 2077
原创 LeetCode(173) Binary Tree Iterator
题目如下:Binary Search Tree Iterator Total Accepted: 1205 Total Submissions: 4041 My Submissions Question Solution Implement an iterator over a binary search tree (BST). Your iterator will be initiali
2015-01-02 15:43:47 4304
原创 LeetCode(164) Maximum Gap
题目如下:Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 if the array contains less than 2 eleme
2015-01-02 10:59:16 4684 2
原创 LeetCode(172) Factorial Trailing Zeroes
题目如下:Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.分析如下:看上去简单,但是写出logarithmic time complexity的代码还是需要一些思考的。分析在下
2015-01-02 03:46:08 7986 3
原创 LeetCode(171) Excel Sheet Column Number
题目如下:Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28
2015-01-02 01:14:49 5722
原创 LeetCode(162) Find Peak Element
题目如下:A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple peaks,
2015-01-01 16:36:25 2564
原创 LeetCode(56) Insert Intervals
题目如下:Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their start times.
2015-01-01 03:23:05 714
数据挖掘--概念.模型.方法和算法
2009-09-20
机器学习 Tom Mitchell 中文版
2009-09-20
机器学习英文版Machine Learning(Mitchell)(下)
2009-09-14
机器学习英文版Machine Learning(Mitchell)(中)
2009-09-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人