上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 29 下一页

single-number

摘要: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime comple 阅读全文
posted @ 2017-03-07 13:15 123_123 阅读(65) 评论(0) 推荐(0) 编辑

binary-tree-preorder-traversal

摘要: //二叉树前序遍历非递归 阅读全文
posted @ 2017-03-07 12:32 123_123 阅读(85) 评论(0) 推荐(0) 编辑

rotate-image

摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). //给定一个n*n的矩阵,顺时针旋转90度 阅读全文
posted @ 2017-03-07 12:14 123_123 阅读(145) 评论(0) 推荐(0) 编辑

maximum-subarray

摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array[−2,1,−3,4,−1,2,1 阅读全文
posted @ 2017-03-07 11:35 123_123 阅读(84) 评论(0) 推荐(0) 编辑

LeetCode Unique Paths

摘要: //给定m*n的矩阵,从左上角走到左下角需要多少步? 阅读全文
posted @ 2017-03-07 11:28 123_123 阅读(66) 评论(0) 推荐(0) 编辑

best-time-to-buy-and-sell-stock

摘要: //给定数组,找出最大差值。 阅读全文
posted @ 2017-03-07 11:03 123_123 阅读(78) 评论(0) 推荐(0) 编辑

remove-duplicates-from-sorted-list

摘要: Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given1->1->2, return1->2. Given1->1->2->3->3, 阅读全文
posted @ 2017-03-07 03:13 123_123 阅读(85) 评论(0) 推荐(0) 编辑

merge-two-sorted-lists

摘要: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *m... 阅读全文
posted @ 2017-03-07 02:54 123_123 阅读(78) 评论(0) 推荐(0) 编辑

binary-tree-inorder-traversal

摘要: /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solut... 阅读全文
posted @ 2017-03-07 02:44 123_123 阅读(97) 评论(0) 推荐(0) 编辑

balanced-binary-tree

摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the dept 阅读全文
posted @ 2017-03-07 02:36 123_123 阅读(119) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 29 下一页