package com.fql.lamda.Lamda; import java.util.Arrays;import java.util.List;import java.util.Map;import java.util.stream.Collectors; import javax.swing ...
分类:
其他好文 时间:
2020-06-07 11:14:22
阅读次数:
68
1. Write a Java program to reverse an array of integer values. package com.w3resource; import java.util.Arrays; public class ReverseArray { public sta ...
分类:
编程语言 时间:
2020-06-07 01:00:04
阅读次数:
74
哈希表+双指针 思路 先排序,后遍历 题目要求找出最长连续序列的长度,注意是找出,所以数组中的元素有可能是重复的。 如何排除重复值,很容易就想到Set集合,所以转成Set集合 后续的遍历用到双指针,为了便于操作又把Set集合转数组,再排序。 因为用到Arrays.sort(),其时间复杂度 为O(n ...
分类:
其他好文 时间:
2020-06-06 21:24:58
阅读次数:
56
今天在复习可变与不可变的时候写了一个小demo进行测试,主要是打算测试一下函数对参数的直接修改。但是运行的时候却发现抛出了java.lang.UnsupportedOperationException这个异常。 出错位置: public class ListTest { public static ...
分类:
编程语言 时间:
2020-06-06 20:12:43
阅读次数:
71
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100 ...
分类:
其他好文 时间:
2020-06-06 11:10:45
阅读次数:
57
问题:Given two integers n and k, return all possible combinations of k numbers out of 1 … n. For example,If n = 4 and k = 2, a solution is: [ [2,4], [3, ...
分类:
其他好文 时间:
2020-06-06 01:16:22
阅读次数:
93
代码示例: 在编辑器中输入 div.one#two$*3>p{我是$}*2+a{a标签} ,按Tab键,会生成如下htmL <div class="one" id="two1"> <p>我是1</p> <p>我是2</p> <a href="">a标签</a></div> <div class="o ...
分类:
Web程序 时间:
2020-06-06 01:13:44
阅读次数:
118
1066 Root of AVL Tree (25分) An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node diff ...
分类:
其他好文 时间:
2020-06-05 23:18:28
阅读次数:
73
join Thread类 设计一个模型 1.有两个线程 One Two ;Two加入到One里面 2.设计模型的时候 two线程在one的run里面创建 保证两个有先后顺序 3.two.join(); 无参数==0 有参数==2000 synchronized锁 非常的厉害 一旦对象被锁定 不释放的 ...
分类:
编程语言 时间:
2020-06-05 22:48:25
阅读次数:
86
htop在epel YUM源中 F1:显示帮助信息 F2:配置界面 F3:进程搜索 F4:进程过滤 F3进程搜索会将光标定位到符合搜索条件的进程上,按F3跳到下一个 F4是将所有符合条件的进程筛选出来 F5:显示进程树/sorted排序 再按F3或者F4查找 F6排序 在左侧选择想要按照哪个属性排序 ...
分类:
系统相关 时间:
2020-06-05 21:29:52
阅读次数:
85