【leetcode】49. Group Anagrams(c/c++,medium难度)

原题链接 Medium Given an array of strings, group anagrams together. Example: Input: ["eat", "tea", "t...

2018-08-08 10:57:24

阅读数:4

评论数:0

【leetcode】38. Count and Say(c/c++,easy难度)

原题链接 easy The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3. 21 4. 1211...

2018-08-07 17:52:18

阅读数:8

评论数:0

【leetccode】66. Plus One(c/c++,easy难度)

原题链接 easy Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most...

2018-08-03 15:22:02

阅读数:11

评论数:0

【leetcode】123. Best Time to Buy and Sell Stock III(c/c++,hard难度)

原题链接 Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You m...

2018-08-03 14:03:46

阅读数:11

评论数:0

【leetcode】122. Best Time to Buy and Sell Stock II (c/c++,easy难度)

原题链接 easy Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. ...

2018-08-02 15:32:16

阅读数:16

评论数:0

【leetcode】121. Best Time to Buy and Sell Stock(c/c++,easy难度)

原题链接  easy Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most ...

2018-08-02 13:50:08

阅读数:13

评论数:0

【leetcode】300. Longest Increasing Subsequence(c/c++)

原题链接 Given an unsorted array of integers, find the length of longest increasing subsequence. Example:  Input:[10,9,2,5,3,7,101,18] Output: 4 Exp...

2018-08-01 21:35:27

阅读数:24

评论数:0

【leetcode】53. Maximum Subarray

原题链接 Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Exam...

2018-08-01 14:39:02

阅读数:5

评论数:0

【leetcode】9 回文数

判断一个整数是否是回文数。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。示例 1:输入: 121 输出: true 示例 2:输入: -121 输出: false 解释: 从左向右读, 为 -121 。 从右向左读, 为 121- 。因此它不是一个回文数。 示例 3:输入: 10 ...

2018-06-16 14:36:41

阅读数:21

评论数:0

【leetcode】7 反转整数 (c++)

题目链接给定一个 32 位有符号整数,将整数中的数字进行反转。示例 1:输入: 123 输出: 321  示例 2:输入: -123 输出: -321 示例 3:输入: 120 输出: 21 注意:假设我们的环境只能存储 32 位有符号整数,其数值范围是 [−231,  231 − 1]。根据这个...

2018-06-15 15:50:55

阅读数:51

评论数:0

【leetcode】1 两数之和 (c++)

题目链接 第一次做leetcode。。有点手足无措。。给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用。示例:给定 nums = [2, 7, 11, 15], target = 9 因为 nums[0] + nums[1]...

2018-06-14 19:36:46

阅读数:20

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭