Solution lca+前缀和 快读不要忘写c= 复杂度 \(O(nk)\) Code #include<iostream> #include<cstdio> #include<cstdlib> #define ll long long using namespace std; const int ...
分类:
其他好文 时间:
2021-06-21 19:59:39
阅读次数:
0
题目链接:串联字符串的最大长度 题目描述: 题解: class Solution { public: int maxLen = 0; void backTracking(vector<string>& arr, int index, vector<int>& letters) { int len = ...
分类:
其他好文 时间:
2021-06-19 19:33:37
阅读次数:
0
Terminology “promise” is an object or function with a then method whose behavior conforms to this specification. “thenable” is an object or function t ...
分类:
其他好文 时间:
2021-06-18 19:35:32
阅读次数:
0
##AntV 图可视分析解决方案 详细介绍 AntV 图可视分析解决方案 ...
分类:
其他好文 时间:
2021-06-18 18:52:06
阅读次数:
0
一个数组中只有一个数字出现一次,其他数字都出现两次,请找出这个数字 class Solution { public int singleNumber(int[] nums) { int res = 0; for (int num : nums) { res ^= num; } return res; ...
分类:
其他好文 时间:
2021-06-17 16:49:19
阅读次数:
0
error: manifest missing or unreadable -- please run init due to i made a mistake by deleting .git of kernel , i need recover it . so i found solution ...
分类:
其他好文 时间:
2021-06-16 18:11:46
阅读次数:
0
二分寻找边界 public class Solution extends VersionControl { public int firstBadVersion(int n) { int i = 1; int j = n; while (i<=j) { int mid = i + ((j-i)>>1 ...
分类:
其他好文 时间:
2021-06-15 18:12:30
阅读次数:
0
Python3 双指针 class Solution: def isPalindrome(self, s: str) -> bool: n = len(s) left, right = 0, n - 1 while left < right: while left < right and not s ...
分类:
编程语言 时间:
2021-06-13 10:55:47
阅读次数:
0
1)取异或,然后计算1的个数 class Solution: def hammingDistance(self, x: int, y: int) -> int: t = x^y count = 0 while t: count += 1 t = t& t-1 return count ...
分类:
编程语言 时间:
2021-06-11 19:07:12
阅读次数:
0
leetcode链接 题目 给定一个 n × n 的二维矩阵 matrix 表示一个图像。请你将图像顺时针旋转 90 度。 你必须在 原地 旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要 使用另一个矩阵来旋转图像。 代码 class Solution { public: void rotat ...
分类:
其他好文 时间:
2021-06-11 18:46:36
阅读次数:
0