Ryan’s leetcode Blog
显示标签为“
math
”的博文。
显示所有博文
显示标签为“
math
”的博文。
显示所有博文
2015年10月16日星期五
Count Primes leetcode
›
Description: Count the number of prime numbers less than a non-negative number, n . 厄拉多塞筛法(Sieve of Eeatosthese): 从第一个质数开始 把所有他的倍数都去掉,...
2015年10月14日星期三
Excel Sheet Column Title leetcode
›
Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A 2 -> B ...
2015年6月26日星期五
Max Points on a Line leetcode
›
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 给一个2d的平面, 所给的数据结构point代表一个点, 让找一条点最多的...
Valid Number
›
Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => ...
2015年6月25日星期四
Sqrt(x) leetcode
›
Implement int sqrt(int x) . 注意这道题是返回int 的平方根 所以: sqrt(3) = 1 sqrt(4) = 2 sqrt(5) = 2 sqrt(10) = 3 用二分法来判定 逐步找到平方根, 但是要注意的是只要符合 m...
Add Binary leetcode
›
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "1...
Plus One leetcode
›
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significa...
Multiply Strings leetcode
›
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large an...
2015年6月23日星期二
Reverse Integer leetcode
›
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 "越是简单的题目越要注意细节,一般来说整数的处理问题要注意的有两点,一...
2015年6月4日星期四
Permutation Sequence leetcode
›
The set [1,2,3,…, n ] contains a total of n ! unique permutations. By listing and labeling all of the permutations in order, We get t...
›
主页
查看网络版本