最近两周一直感觉学习比较松懈, 打算加大一点强度, 从今天开始, 希望能在每天正常进度完成后在LeetCode上选一两题写一写, 同时学习一下高手的做法. LeetCode - Algorithms #001 Two Sum 给定一个整数数组, 找出其中两个元素, 使其和等于目标值, 返回这两个元素 ...
分类:
数据库 时间:
2018-09-25 23:02:39
阅读次数:
255
A literal type is a type that represents exactly one value, e.g. one specific string or number. You can combine literal types with union types to mode ...
分类:
其他好文 时间:
2018-09-19 19:45:13
阅读次数:
156
1 class Solution { 2 List> res = new ArrayList(); 3 public List> combine(int n, int k) { 4 if(k == 0) return null; 5 int[] nums = new int[n]; 6 for(in... ...
分类:
其他好文 时间:
2018-09-15 23:24:22
阅读次数:
204
调参数是一件很头疼的事情,今天学习到一个较为简便的跑循环交叉验证的方法,虽然不是最好的,如今网上有很多调参的技巧,目前觉得实现简单的,以后了解更多了再更新。 输出: 1011121314151617181920212223242526272829[0.97412964956075354, 0.972 ...
分类:
其他好文 时间:
2018-09-15 01:16:31
阅读次数:
181
//实现顺序表的建立、初始化、插入、删除、修改、普通合并、有序合并 #include<iostream> #include<stdio.h> #include<stdlib.h> using namespace std; #define OK 1 #define ERROR 0 #define OV ...
分类:
其他好文 时间:
2018-09-10 21:18:24
阅读次数:
275
But what is Python and why is it the language of choice by many DevOps engineers? Python是什么?为什么这么多的开发运维工程师选择Python? 下面是来自PSF(The Python Software Found ...
分类:
编程语言 时间:
2018-09-05 00:54:34
阅读次数:
206
题目描述 给定两个整数 n 和 k,返回 1 ... n 中所有可能的 k 个数的组合。 示例: 解题思路 回溯法,每次遍历到一个元素分为放入与不放入集合两种情况,若集合长度为k,则加入到结果中。 代码 ...
分类:
其他好文 时间:
2018-08-28 13:04:34
阅读次数:
129
题目:http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=1022 想法:比 亲戚这一题难,因为还涉及到 退出 即 解除关系 问题,除了find()、combine()函数还新加一个删除delet()函数。 人(诸侯国)先坐在箱子里,然后连箱子,最 ...
分类:
其他好文 时间:
2018-08-23 19:23:50
阅读次数:
196
函数描述 array() 创建数组。 array_change_key_case() 把数组中所有键更改为小写或大写。 array_chunk() 把一个数组分割为新的数组块。 array_column() 返回输入数组中某个单一列的值。 array_combine() 通过合并两个数组来创建一个新 ...
分类:
编程语言 时间:
2018-08-20 14:30:18
阅读次数:
185
题目描述: 给定两个整数 n 和 k,返回 1 ... n 中所有可能的 k 个数的组合。 示例: 要完成的函数: vector<vector<int>> combine(int n, int k) 说明: 1、这道题给定两个int型整数n和k,要求在[1,n]的闭区间中找到k个整数的组合(组合也就 ...
分类:
其他好文 时间:
2018-08-19 21:56:08
阅读次数:
114