题目描述 A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[…
分类:LeetCode题目解答
279. Perfect Squares
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ……
[Leetcode] Populating Next Right Pointers in Each Node 二叉树Next指针
Populating Next Right Pointers in Each Node I Given a binary tree struct TreeLinkNode { TreeLinkNode *left; Tr…
【leetcode】88. Merge Sorted Array 有序数组的merge
1. 题目 Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You ma…
力扣(LeetCode)72
题目地址:https://leetcode-cn.com/probl…题目描述:给定两个单词 word1 和 word2,计算出将 word1 转换成 word2 所使用的最少操作数 。 你可以对一个单词进行…
[LeetCode] Gas Station 加油站问题
There are N gas stations along a circular route, where the amount of gas at station i&nb…
[LeetCode] Minimum Window Subsequence 最小窗口序列
Given strings S and T, find the minimum (contiguous) substring W of …
LeetCode 228 Summary Ranges
题目描述 Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,…
LeetCode 165 Compare Version Numbers
题目描述 Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 < v…
58. Length of Last Word
58. Length of Last Word 题目 Given a string s consists of upper/lower-case alphabets and empty space characters …
[LeetCode] Jump Game 跳跃游戏
Given an array of non-negative integers, you are initially positioned at the first index of the array. …
[LeetCode] Valid Number 验证数字
Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc"…