码迷,mamicode.com
首页 >  
搜索关键字:generic algorithm    ( 18934个结果
LRU算法的实现
缘由:看到redis的缓存淘汰机制,便自己实现了一下 代码实现(双向链表+HashMap) package com.jarjune.jdalao.framework.algorithm; import java.util.*; /** * LRU * @author jarjune * @versi ...
分类:编程语言   时间:2020-11-24 12:37:52    阅读次数:8
HDU100题简要题解(2040~2049)
HDU2040 亲和数 题目链接 Problem Description 古希腊数学家毕达哥拉斯在自然数研究中发现,220的所有真约数(即不是自身的约数)之和为: 1+2+4+5+10+11+20+22+44+55+110=284。 而284的所有真约数为1、2、4、71、 142,加起来恰好为22 ...
分类:其他好文   时间:2020-11-24 12:32:09    阅读次数:8
编写程序,计算数组中奇数之和和偶数之和。
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace odds { class Program { s ...
分类:编程语言   时间:2020-11-23 12:16:41    阅读次数:8
c#学习02
string方法的一些函数作用 2.继承演示 -子类 using System; using System.Collections.Generic; using System.Text; namespace ConsoleApp1 { /// <summary> /// 胡萝卜类:继承与蔬菜类。在这 ...
分类:Windows程序   时间:2020-11-23 12:13:10    阅读次数:19
SHA1 VS RSA: what's the difference between them?
SHA1 VS RSA: what's the difference between them? Fundamentally different. SHA1 is a hash algorithm, which is a one way function, turning an input of a ...
分类:其他好文   时间:2020-11-23 12:09:41    阅读次数:4
Power of Two Choices 负载均衡
NGINX and the "Power of Two Choices" Load-Balancing Algorithm - NGINX https://www.nginx.com/blog/nginx-power-of-two-choices-load-balancing-algorithm/ ...
分类:其他好文   时间:2020-11-23 11:48:43    阅读次数:4
Codeforces Round #682 (Div. 2) 题解(A-E)
题意:构造一个长度为n的数组,使得每个子数组中所有元素的和能被这个子数组的长度整除 解题思路:显然,构造一个元素全部相同的数组即可满足要求 代码: #include<iostream> #include<algorithm> #include<vector> #include<cstdio> #in ...
分类:其他好文   时间:2020-11-21 11:55:12    阅读次数:6
事件 应用于授权子窗体传递验证数据给主窗体
一、事件定义类,即子窗体 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; ...
分类:Windows程序   时间:2020-11-13 13:16:37    阅读次数:33
Acwing 837. 连通块中点的数量 (裸题,并查集求连通块中点数目)
地址:https://www.acwing.com/problem/content/839/ 只是记录个板子,不做解析。 #include<cstdio> #include<cstring> #include<vector> #include<algorithm> #include<iostream ...
分类:Windows程序   时间:2020-11-13 12:55:15    阅读次数:26
c++中next_permutation()应用
介绍next_permutation()是stl算法库中的方法,主要实现的是用字典序的方法求全排,具体算法后面补写。 下面是几个它的应用场景: 1.凑算式 A-G为1-9中各不相同的数,求有多少组合满足上式。 #include<stdio.h> #include<algorithm> #includ ...
分类:编程语言   时间:2020-11-13 12:22:10    阅读次数:9
18934条   上一页 1 ... 21 22 23 24 25 ... 1894 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!