地址 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
题目备注: 1.链表至少包含两个节点 2.链表中所有节点的值都是唯一的 3.给定的节点为非末尾节点并且一定是链表中的一个有效节点 4.不要从你的函数中返回任何结果 方法:与下一个节点交换 从链表里删除一个节点 node 的最常见方法是修改之前节点的 next 指针,使其指向之后的节点。 因为,我们无 ...
分类:
编程语言 时间:
2021-02-10 13:42:05
阅读次数:
0
给定一个二进制数组, 计算其中最大连续1的个数。 示例 1: 输入: [1,1,0,1,1,1] 输出: 3 解释: 开头的两位和最后的三位都是连续1,所以最大连续1的个数是 3. 注意: 输入的数组只包含 0 和1。 输入数组的长度是正整数,且不超过 10,000。 来源:力扣(LeetCode) ...
分类:
其他好文 时间:
2021-02-10 13:25:51
阅读次数:
0