![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
刷题总结
Changcc_
记录学习心得体会!
展开
-
快速选择算法,求第k大或小的算法
求第k小算法也就是快速选择算法,看到一个博客很详细分享一下地址:快速选择算法实现求第k大算法c++实现方式代码1#include "stdio.h"#include <vector>#include <iostream>using namespace std;int findPos(vector<int>& arr, int lef...原创 2019-07-28 22:01:58 · 570 阅读 · 0 评论 -
给定整数序列求连续子串最大和
java实现import java.util.Scanner; /** * Dynamic Programming * * State: * dp[i]: 以a[i]为结尾的连续子串的最大和 * * Initial State: * dp[0] = a[0] * * State Transition: * if (dp[i - 1] >= 0) dp[...原创 2019-07-29 18:56:40 · 473 阅读 · 0 评论