1th 两数之和 暴力枚举法 直接两重循环暴力枚举,很慢。 class Solution { public int[] twoSum(int[] nums, int target) { int[] ans = new int[2]; for(int i = 0; i < nums.length; i ...
分类:
其他好文 时间:
2020-07-04 14:59:09
阅读次数:
48
代码 .data S17: .asciiz "the bigger one is:" .text move $fp $sp j main max: lw $t8 0($sp) subi $sp $sp 8 sw $t8 0($sp) addi $sp $sp 12 lw $t8 0($sp) sub ...
分类:
其他好文 时间:
2020-07-04 13:23:36
阅读次数:
94
找bug 看例子: test_scores = [100, 97, 76, 84, 93, 98, 86, 92, 76, 88, 95, 90, 95, 93] new_scores = test_scores.sort() new_scores = new_scores.reverse() pr ...
分类:
其他好文 时间:
2020-07-04 13:11:41
阅读次数:
80
procedure TMainForm.ConnectRDPByIndex(index: Integer); var ServerItem: PServerItem; tmpRpdFile, cmd: string; listview: TListView; begin listview := Ge ...
分类:
其他好文 时间:
2020-07-04 11:55:21
阅读次数:
70
给你一个长度为 $n$ 的长字符串,完美子串既是它的前缀也是它的后缀,求完美子串的个数且统计这些子串的在长字符串中出现的次数。 ...
分类:
其他好文 时间:
2020-07-03 21:13:13
阅读次数:
50
原题地址: 来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/evaluate-reverse-polish-notation 根据 逆波兰表示法,求表达式的值。 有效的运算符包括 +, -, *, / 。每个运算对象可以是整数,也可以是另一个逆波 ...
分类:
编程语言 时间:
2020-07-03 19:47:36
阅读次数:
61
Integer 让人疑惑的Java代码——Integer ...
Native Query throw exception dto code import lombok.Value; @Value public class IdsOnly { Integer id; String otherId; } repository public interface Tes ...
分类:
编程语言 时间:
2020-07-03 11:00:36
阅读次数:
147
Maximum Subarray (E) 题目 Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and retur ...
分类:
其他好文 时间:
2020-07-03 09:14:00
阅读次数:
76
Set接口 extend Collection接口 特点:1、不允许重复的元素 2、设有索引,没有带索引的方法,也不能进行普通for 3、是一个元素的集合,存取可能不一致 4、底层是哈希表(查询快) 方法上和Collection一致 实现类:HashSet:由哈希表构成 例:Set<Integer> ...
分类:
其他好文 时间:
2020-07-03 00:59:20
阅读次数:
55