![](https://img-blog.csdnimg.cn/20191016225408463.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
Leetcode
赵延超
敢于知道,因为真理使我们自由!
展开
-
leetcode-1025. Divisor Game
DescriptionAlice and Bob take turns playing a game, with Alice starting first.Initially, there is a number N on the chalkboard. On each player’s turn, that player makes a move consisting of:Choos...原创 2020-03-21 22:40:07 · 167 阅读 · 0 评论 -
leetcode-70. Climbing Stairs
DescriptionYou are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will ...原创 2020-03-20 22:45:11 · 128 阅读 · 0 评论 -
leetcode-9. 回文数
问题描述判断一个整数是否是回文数。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。示例示例 1:输入: 121输出: true示例 2:输入: -121输出: false解释: 从左向右读, 为 -121 。 从右向左读, 为 121- 。因此它不是一个回文数。示例 3:输入: 10输出: false解释: 从右向左读, 为 01 。因此它不是一个...原创 2019-11-08 11:14:00 · 193 阅读 · 0 评论 -
leetcode-7.整数翻转
问题描述给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。示例示例 1:输入: 123输出: 321示例 2:输入: -123输出: -321示例 3:输入: 120输出: 21注意假设我们的环境只能存储得下 32 位的有符号整数,则其数值范围为 [−231, 231 − 1]。请根据这个假设,如果反转后整数溢出那么就返回 0。解决方...原创 2019-11-08 11:02:27 · 133 阅读 · 0 评论 -
leetcode-1.两数之和
问题描述给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。示例给定 nums = [2, 7, 11, 15], target = 9因为 nums[0] + nums[1] = 2 + 7 = 9所以返回 [0, 1]题目详解...原创 2019-11-06 16:22:48 · 97 阅读 · 0 评论