Record the process of Leetcode by issue Weekly Contest Date Weekly Contest 162 11/10/2019 BiWeekly Contest 13 11/16/2019 Weekly Contest 163 11/17/2019 ...
分类:
其他好文 时间:
2020-07-21 14:05:16
阅读次数:
84
解题思路:一开始不知道怎么下手,暴力遍历也没有合适的方法。参考了题解,了解到回溯算法,结合他人的代码,写了出来 借用题解的决策树图: 1 //参考了题解的回溯算法 2 public static List<List<Integer>> combinationSum(int[] candidates, ...
分类:
其他好文 时间:
2020-07-21 01:00:33
阅读次数:
67
思路: 1.对空格进行消除处理(有些地方存在空格很多的情况) 2.对每一个字符串进行翻转 reverse( ) 3.将字符串叠加到K上,最终k个字符串组成一个字符串组 4.删除多余的空字符erase(s.begin()+k,s.begin()) 5.在翻转一次 代码: class Solution ...
分类:
其他好文 时间:
2020-07-21 00:55:33
阅读次数:
75
01:请写一个函数reverse,参数是一个列表,该函数将列表中的所有元素倒序排列并返回 02:延伸:该函数调用后不能改变原来参数列表的内容 03:请写一个函数tri_area,参数是三角形的底和高,请计算返回三角形面积 04:请写一个函数remainder,参数是两个数字,请计算返回这两个数字相除 ...
分类:
编程语言 时间:
2020-07-20 13:19:41
阅读次数:
92
1 /** 2 * 获取值的区间 3 * 4 * @param num 值 5 */ 6 public static Map<String, Integer> getNumSection(Integer num) { 7 Map<String, Integer> map = new HashMap( ...
分类:
编程语言 时间:
2020-07-20 13:07:55
阅读次数:
75
参考: https://www.cnblogs.com/En-summerGarden/p/10145295.html //只能输入整数 function Integer(obj) { if (obj.value.length == 1) { obj.value = obj.value.replac ...
分类:
Web程序 时间:
2020-07-20 10:56:19
阅读次数:
153
1.1题目 给定一个已按照升序排列 的有序数组,找到两个数使得它们相加之和等于目标数。函数应该返回这两个下标值 index1 和 index2,其中 index1 必须小于 index2。 说明: 返回的下标值(index1 和 index2)不是从零开始的。 你可以假设每个输入只对应唯一的答案,而 ...
分类:
编程语言 时间:
2020-07-20 10:49:07
阅读次数:
66
####报文格式 {"name":"文件名","out":"文件字节码"} ####通过接口下载远程文件 public void downloadFrom(HttpServletResponse res, HttpServletRequest request, Integer id) throws ...
分类:
Web程序 时间:
2020-07-20 10:31:48
阅读次数:
106
概述 ThreadLocal提供了一种线程安全的数据访问方式,每个线程中都存在一个共享变量副本,从而实现多线程状态下的线程安全。 demo public static void main(String[] args) { final ThreadLocal<Integer> MAIN = Threa ...
分类:
其他好文 时间:
2020-07-19 23:56:13
阅读次数:
81
##题目 Pasha loves to send strictly positive integers to his friends. Pasha cares about security, therefore when he wants to send an integer n, he encry ...
分类:
其他好文 时间:
2020-07-19 23:37:51
阅读次数:
80