![](https://img-blog.csdnimg.cn/20200812174626560.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
leetcode
leetcode平台刷题记录,自用为主!!!!!
「已注销」
这个作者很懒,什么都没留下…
展开
-
leetcode35. Search Insert Position
题目:Search Insert Position英文描述:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.中文描述:给定一个排序数组和一个目标值,在数组中找到目原创 2020-09-05 10:21:24 · 116 阅读 · 0 评论 -
leetcode13.Roman to Integer(罗马数字转整数)
标题:Roman to Integer英文描述:Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D 500M 1000For exa原创 2020-09-04 13:59:39 · 151 阅读 · 0 评论 -
leetcode9. Palindrome Number(回文数)
题目: Palindrome Number描述:Determine whether an integer is a palindrome.An integer is apalindrome when it reads the same backward as forward.示例:Example 1:Input: 121Output: trueExample 2:Input: -121Output: falseExplanation: From left to right, it read原创 2020-09-03 22:21:19 · 155 阅读 · 0 评论 -
leetcode7.ReverseInteger(整数反转)
题目:Reverse Integer描述:Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dealing with an environment which could only stor原创 2020-09-03 18:18:38 · 189 阅读 · 0 评论 -
1.Two Sum(两数之和)
题目:Two Sum描述:Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume(假设) that each input would have exactly(准确的) one solution, and you may not use the same element(元素) twice.Example:Give原创 2020-08-12 17:40:18 · 134 阅读 · 0 评论 -
1518. Water Bottles(换酒问题)
题目:1518. Water Bottles描述:Given numBottles full water bottles, you can exchange numExchange empty water bottles for one full water bottle.The operation of drinking a full water bottle turns it into an empty bottle.Return the maximum number of water bottl原创 2020-08-11 18:35:07 · 328 阅读 · 0 评论 -
414. Third Maximum Number(第三大的数)
题目:414. Third Maximum Number描述:Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).Example 1:Input: [3, 2, 1]Output: 1Explanation: The原创 2020-08-09 22:15:20 · 122 阅读 · 0 评论 -
剑指 Offer 03. 数组中重复的数字(java多解版)
题目:剑指 Offer 03. 数组中重复的数字描述:在一个长度为 n 的数组 nums 里的所有数字都在 0~n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个数字重复了几次。请找出数组中任意一个重复的数字。示例:输入:[2, 3, 1, 0, 2, 5, 3]输出:2 或 3来源:力扣(LeetCode)限制:2 <= n <= 100000分析:给定一个指定范围的无序数组,找出其中的重复数字,可以又多个重复数字,但只要求找出其一即可;解法一:排原创 2020-08-07 10:50:03 · 202 阅读 · 0 评论