
易
文章平均质量分 69
KiraYin--
这个作者很懒,什么都没留下…
展开
-
[LeetCode] Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach th原创 2013-06-21 02:19:13 · 1236 阅读 · 0 评论 -
[LeetCode] Search Insert Position
class Solution {public: int searchInsert(int A[], int n, int target) { // Start typing your C/C++ solution below // DO NOT write int main() function int size=n; if原创 2013-06-20 01:19:48 · 750 阅读 · 0 评论 -
[LeetCode] Unique Paths 2
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the原创 2013-06-21 02:29:08 · 1076 阅读 · 0 评论 -
[LeetCode] Plus one
class Solution {public: vector plusOne(vector &digits) { // Start typing your C/C++ solution below // DO NOT write int main() function int size=digits.size(); vect原创 2013-08-26 12:16:53 · 843 阅读 · 0 评论 -
[LeetCode] Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is read原创 2013-08-28 13:04:50 · 1070 阅读 · 0 评论 -
[LeetCode] Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total number of bits in the code, print the sequence of原创 2013-10-24 11:28:07 · 697 阅读 · 0 评论 -
[LeetCode] Contains Duplicate
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element原创 2015-06-11 13:48:11 · 849 阅读 · 0 评论