https://leetcode-cn.com/problems/hua-dong-chuang-kou-de-zui-da-zhi-lcof/ https://leetcode-cn.com/problems/min-stack-lcci/ 1. 这两题都是要在O(1)时间内得到当前栈内的最小值 ...
分类:
其他好文 时间:
2021-02-17 14:19:50
阅读次数:
0
题目 给定一个范围在 1 ≤ a[i] ≤ n ( n = 数组大小 ) 的 整型数组,数组中的元素一些出现了两次,另一些只出现一次。找到所有在 [1, n] 范围之间没有出现在数组中的数字。您能在不使用额外空间且时间复杂度为O(n)的情况下完成这个任务吗? 你可以假定返回的数组不算在额外空间内。来 ...
分类:
其他好文 时间:
2021-02-17 14:19:02
阅读次数:
0
地址 https://leetcode-cn.com/problems/ba-zi-fu-chuan-zhuan-huan-cheng-zheng-shu-lcof/ 写一个函数 StrToInt,实现把字符串转换成整数这个功能。不能使用 atoi 或者其他类似的库函数。 首先,该函数会根据需要丢弃 ...
分类:
其他好文 时间:
2021-02-17 14:11:25
阅读次数:
0
此博客链接: 寻找重复数 题目链接:https://leetcode-cn.com/problems/find-the-duplicate-number/ 题目 给定一个包含 n + 1 个整数的数组 nums ,其数字都在 1 到 n 之间(包括 1 和 n),可知至少存在一个重复的整数。 假设 ...
分类:
其他好文 时间:
2021-02-17 14:08:35
阅读次数:
0
回溯算法 这部分主要是学习了 labuladong 公众号中对于回溯算法的讲解 刷了些 leetcode 题,在此做一些记录,不然没几天就忘光光了 总结 概述 回溯是 DFS 中的一种技巧。回溯法采用 试错 的思想,尝试分步的去解决一个问题,在分步解决问题的过程中,当它通过尝试发现现有的分步答案不能 ...
分类:
编程语言 时间:
2021-02-16 12:14:33
阅读次数:
0
此博客链接:https://www.cnblogs.com/ping2yingshi/p/14399182.html 盛最多水的容器 题目链接:https://leetcode-cn.com/problems/container-with-most-water/submissions/ 题目 给你 ...
分类:
其他好文 时间:
2021-02-16 12:13:20
阅读次数:
0
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals ...
分类:
其他好文 时间:
2021-02-16 12:04:54
阅读次数:
0
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such an arrangement is not pos ...
分类:
其他好文 时间:
2021-02-15 12:21:35
阅读次数:
0
给你一个整型数组 nums ,在数组中找出由三个数组成的最大乘积,并输出这个乘积。 示例 1: 输入:nums = [1,2,3] 输出:6 示例 2: 输入:nums = [1,2,3,4] 输出:24 示例 3: 输入:nums = [-1,-2,-3] 输出:-6 提示: 3 <= nums. ...
分类:
其他好文 时间:
2021-02-15 11:53:07
阅读次数:
0
You are given a series of video clips from a sporting event that lasted T seconds. These video clips can be overlapping with each other and have varie ...
分类:
其他好文 时间:
2021-02-15 11:46:25
阅读次数:
0