摘要:
【题目】 寻找峰值返回坐标,比左右都大,时间复杂度必须是 O(log n) A peak element is an element that is strictly greater than its neighbors. Given an integer array nums, find a pe 阅读全文
摘要:
【题目】 说了一堆就是在旋转后的顺序数组中找最小值,时间复杂度必须是 O(log n) Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the 阅读全文
摘要:
【题目】 两个数组,求他们最长的相同子串长度,数组长度不一定相同 Given two integer arrays nums1 and nums2, return the maximum length of a subarray that appears in both arrays. Exampl 阅读全文
摘要:
【题目】 多次方计算,主要是正负两种情况 Implement pow(x, n), which calculates x raised to the power n (i.e., xn). Example 1: Input: x = 2.00000, n = 10 Output: 1024.0000 阅读全文
摘要:
leetcode33 【题目】 顺序排列的数组,每个点值不同。以某个点进行旋转(其实就是前后两段交换位置),对旋转后数组搜索有无target,没有-1,有返回位置 (变式81不同点在于会出现重复数字) There is an integer array nums sorted in ascendin 阅读全文