剑指 Offer 57. 和为s的两个数字 地址:剑指 Offer 57. 和为s的两个数字 输入一个递增排序的数组和一个数字s,在数组中查找两个数,使得它们的和正好是s。如果有多对数字的和等于s,则输出任意一对即可。 示例 1: 输入:nums = [2,7,11,15], target = 9 ...
分类:
其他好文 时间:
2021-01-26 12:20:29
阅读次数:
0
1.less的使用,使用less时,需要下载Easy LESS,这样创建两个js文件,index.less及index.css,只用操作index.less会自动转化为index.css,还有设置 px时会提示转化为rem 2.动画 .div2 width: 8.0375rem; height: 8 ...
分类:
其他好文 时间:
2021-01-26 12:19:33
阅读次数:
0
剑指 Offer 05. 替换空格 请实现一个函数,把字符串 s 中的每个空格替换成"%20"。 示例 1: 输入:s = "We are happy." 输出:"We%20are%20happy." 限制: 0 <= s 的长度 <= 10000 解题思路 先扫描数组, 统计空格的数量, 每个空格 ...
分类:
其他好文 时间:
2021-01-26 12:00:18
阅读次数:
0
剑指 Offer 04. 二维数组中的查找 在一个 n * m 的二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个高效的函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。 示例: 现有矩阵 matrix 如下: [ [1, 4, 7, 1 ...
分类:
编程语言 时间:
2021-01-26 11:58:21
阅读次数:
0
Problem LeetCode Given the root of a binary tree, return the sum of every tree node's tilt. The tilt of a tree node is the absolute difference between ...
分类:
编程语言 时间:
2021-01-25 11:29:21
阅读次数:
0
Input: intervals = [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into ...
分类:
其他好文 时间:
2021-01-25 11:29:04
阅读次数:
0
此博客链接:https://www.cnblogs.com/ping2yingshi/p/14311268.html 数组形式的整数加法 题目链接:https://leetcode-cn.com/problems/add-to-array-form-of-integer/ 题目 对于非负整数 X 而 ...
分类:
编程语言 时间:
2021-01-22 12:22:52
阅读次数:
0
相比起暴力解法,前缀树可以实现空间换时间。将多个 small 构建为一棵前缀树,在树上遍历一次 big 。可替代用每个 small 与 big 比对。 JAVA: private class Trie { boolean isEnd; Trie[] childs; int num; int flag ...
分类:
其他好文 时间:
2021-01-22 12:17:01
阅读次数:
0
Problem LeetCode Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: I ...
分类:
编程语言 时间:
2021-01-21 10:55:51
阅读次数:
0
地址 https://leetcode-cn.com/problems/palindrome-partitioning/ 给定一个字符串 s,将 s 分割成一些子串,使每个子串都是回文串。 返回 s 所有可能的分割方案。 示例: 输入: "aab" 输出: [ ["aa","b"], ["a","a ...
分类:
其他好文 时间:
2021-01-21 10:34:20
阅读次数:
0