#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef ...
分类:
编程语言 时间:
2021-02-27 13:27:43
阅读次数:
0
问题: 给定二叉树,进行层序遍历,从底层向上输出。 Example 1: Input: root = [3,9,20,null,null,15,7] Output: [[15,7],[9,20],[3]] Example 2: Input: root = [1] Output: [[1]] Exam ...
分类:
其他好文 时间:
2021-02-26 12:54:45
阅读次数:
0
1. 题目描述 Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. 2. Examples 示例1: Input ...
分类:
编程语言 时间:
2021-02-18 13:07:50
阅读次数:
0
编号454:四数相加II 给定四个包含整数的数组列表 A , B , C , D ,计算有多少个元组 (i, j, k, l) ,使得 A[i] + B[j] + C[k] + D[l] = 0。 为了使问题简单化,所有的 A, B, C, D 具有相同的长度 N,且 0 ≤ N ≤ 500 。所有 ...
分类:
其他好文 时间:
2021-02-18 13:03:31
阅读次数:
0
题意 把字符串前面的若干个字符转移到字符串的尾部,要求只用一个函数实现 思路 利用线性代数中的矩阵求逆的思想:\((AB)^{-1} = B^{-1}A^{-1}\) 定义一个函数reverse(s, l, r),将字符串s的[l, r]区间内的元素逆置,比如abc变为cba,这个reverse() ...
分类:
其他好文 时间:
2021-02-16 12:14:14
阅读次数:
0
119. 杨辉三角 II 给定一个非负索引 k,其中 k ≤ 33,返回杨辉三角的第 k 行。 在杨辉三角中,每个数是它左上方和右上方的数的和。 示例: 输入: 3 输出: [1,3,3,1] class Solution { public List<Integer> getRow(int rowI ...
分类:
其他好文 时间:
2021-02-16 11:50:12
阅读次数:
0
勤奋能够弥补聪明的不足,但聪明无法弥补懒惰的缺陷。你好,我是梦阳辰!期待与你相遇! 概述 JUC就是java.util .concurrent工具包的简称,俗称java并发包。这是一个处理线程的工具包,JDK 1.5开始出现的. 01.Java多线程复习 Interface Lock Lock实现提 ...
分类:
其他好文 时间:
2021-02-16 11:41:02
阅读次数:
0
CF1477D Nezzar and Hidden Permutations(构造) 题目大意 你需要构造出两个排列 p, q,满足 m 个限制,第 i 个限制为 $ (p_-p_)\times (q_-q_) \ge 0$,最大化 \(\sum [p_i \neq q_i]\) \(1 \le n ...
分类:
其他好文 时间:
2021-02-15 12:02:24
阅读次数:
0
剑指 Offer 53 - II. 0~n-1中缺失的数字 Offer_53 题目详情 java代码 package com.walegarrett.offer; /** * @Author WaleGarrett * @Date 2021/2/9 20:33 */ /** * 题目详情:一个长度为 ...
分类:
其他好文 时间:
2021-02-10 13:12:51
阅读次数:
0
原题 1 class Solution: 2 def intersect(self, nums1: List[int], nums2: List[int]) -> List[int]: 3 dic1,dic2 = {},{} 4 def helper(nums,dic): 5 for n in nu ...
分类:
编程语言 时间:
2021-02-10 12:50:25
阅读次数:
0