这题思路跟2很相似。唯一的不同点在于,2只是正向做加法,但是445是在逆向做加法。这题我的思路是先用stack存住两个list的nodes,然后pop出来的时候做加法。这样就不需要操心reverse linked list这件事了。 ...
分类:
其他好文 时间:
2019-10-13 15:07:06
阅读次数:
97
Thymeleaf主要使用 org.thymeleaf.expression.Numbers 类处理数字,在模板中使用 #numbers 对象来处理数字。
一、整数格式化 二、小数格式化 三、百分比格式化 四、sequence方法 ...
分类:
其他好文 时间:
2019-10-13 01:04:23
阅读次数:
173
macOS系统的dock默认是永久显示在桌面下方的。也不知道怎么想的这个设计,当最大化窗口时,dock左右两侧会浪费掉一部分空间。整个桌面也不看好。 对于强迫症怎能行。必须全屏,全屏。(macOS系统可以设置自动隐藏dock),设置自动隐藏dock后,当鼠标滑动到底部时dock会自动显示。 滑动到底 ...
分类:
系统相关 时间:
2019-10-12 22:37:09
阅读次数:
126
HDU - 1711 A - Number Sequence Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1 ...
分类:
其他好文 时间:
2019-10-12 20:44:59
阅读次数:
89
原题链接在这里:https://leetcode.com/problems/remove-boxes/ 题目: Given several boxes with different colors represented by different positive numbers.You may ex ...
分类:
其他好文 时间:
2019-10-12 12:53:38
阅读次数:
100
题目: Complete the function which takes two arguments and returns all numbers which are divisible by the given divisor. First argument is an array of nu ...
分类:
其他好文 时间:
2019-10-12 11:28:26
阅读次数:
84
题目 You are given a list of numbers, and a target number k. Return whether or not there are two numbers in the list that add up to k. Example: Given [4 ...
分类:
其他好文 时间:
2019-10-12 01:10:23
阅读次数:
109
Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Yo ...
分类:
其他好文 时间:
2019-10-10 20:26:06
阅读次数:
72
题意:求表中连续出现3次以上的数据. 因此,根据题意构造第一版本答案(使用连续的ID进行比较): 当前版本答案通过了测试,但是运行效率太低了. 分析原因,可能与 条件相关,当 为0时, 1不会寻找到相关数据,导致 执行缓慢. 因此,修改为如下所示: 此版本,效率得到了巨大的提高。 ...
分类:
其他好文 时间:
2019-10-09 15:26:12
阅读次数:
63
题目: 首先使用brute force方法,结果accept了: 我们要用binary search去优化: ...
分类:
其他好文 时间:
2019-10-08 22:05:52
阅读次数:
88