最新 最热

Array - 53. Maximum Subarray

Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.

2020-09-23
0

Array - 152. Maximum Product Subarray

Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product.

2020-09-23
1

Array - 88. Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.

2020-09-23
1

Array - 209. Minimum Size Subarray Sum

Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't one, retur...

2020-09-23
1

3-2 矩阵的子集

> x <- matrix(1:6,nrow=2,ncol=3)> x [,1] [,2] [,3][1,] 1 3 5[2,] 2 4 6

2020-09-16
1

2-5 R语言基础 factor

#因子:分类数据#有序和无序#整数向量+标签label#Male/Female#常用于lm(),glm()

2020-09-16
1

数论-素数

若两个素数相差2则称为一对孪生素数,求区间[1,n]内的孪生素数个数。 筛法素数打表,然后判断孪生,用前缀和记录。

2020-09-15
0

迭代加深搜索-POJ 3134 Power Calculus

什么是迭代加深搜索? 迭代加深搜索(Iterative Deepening DFS,IDDFS)是一种结合了DFS和BFS思想的搜索方法。当搜索树很深且很宽的时候,用DFS会陷入递归无法返回,用BFS队列空间会爆炸,那么可以试试IDDFS,简单来说,就是每次限...

2020-09-15
1

浙大版《C语言程序设计(第3版)》题目集 习题8-1 拆分实数的整数与小数部分

其中x是被拆分的实数(0≤x<10000),intpart和fracpart分别是将实数x拆分出来的整数部分与小数部分。

2020-09-15
0

杭电5178 (二分练习!)

pairs John has n points on the X axis, and their coordinates are (x[i],0),(i=0,1,2,…,n−1). He wants to know how many pairs<a,b> that |x[b]−x[a]|≤k.(a<b)

2020-09-11
1