码迷,mamicode.com
首页 >  
搜索关键字:algorithm    ( 11758个结果)
[Algorithm] 1290. Convert Binary Number in a Linked List to Integer
Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the bi ...
分类:其他好文   时间:2019-12-21 09:41:37    阅读次数:92
模拟赛T2 线段树优化建图+tarjan+拓扑排序
然而这只是 70pts 的部分分,考场上没想到满分怎么做(现在也不会) code: #include <cstdio> #include <string> #include <stack> #include <queue> #include <cstring> #include <algorithm ...
分类:编程语言   时间:2019-12-21 09:30:03    阅读次数:81
模拟赛 T3 dfs序+树状数组+树链的并+点权/边权技巧
code: #include <vector> #include <cstdio> #include <set> #include <cstring> #include <string> #include <algorithm> #define N 200007 #define ll long lo ...
分类:编程语言   时间:2019-12-20 18:13:59    阅读次数:67
kd-tree
点云的搜索kdtree太重要,想要从头手撸一个枝叶分离的代码,所以开始吧。 参考: https://zhuanlan.zhihu.com/p/45346117 https://leileiluoluo.com/posts/kdtree-algorithm-and-implementation.htm ...
分类:其他好文   时间:2019-12-20 14:02:07    阅读次数:98
二分查找专题总结 - 基础篇
二分查找 基础篇 前言 从一个有序的数组中,找到某元素的值,通常思路就是二分查找。二分查找是一个常考的知识点。同时,它也是非常容易出错的一道面试题。左右指针的位置,取值,比较是大于还是大于等于。里面细节很多。死记硬背往往容易出错,只有真正理解思路和多多练习,才能掌握不出错的”二分算法“。 本篇文章是 ...
分类:其他好文   时间:2019-12-20 01:00:52    阅读次数:97
归并排序
归并排序的算法是分治法的一个范例 Like QuickSort, Merge Sort is a Divide and Conquer algorithm.它被分成两半,调用自己来分两半,最后归并两半。 merge() 功能用于合并两半。The merge (arr,l,m,r)是关键的处理arr[ ...
分类:编程语言   时间:2019-12-19 23:46:00    阅读次数:160
算法基础
1. 什么是算法 算法(Algorithm):一个计算过程,解决问题的方法 一个算法应该具有一下七个重要特称: ①有穷性(Finiteness):算法的有穷性是指算法必须能在执行有限个步骤之后终止; ②确切性(Definiteness):算法的每一步骤必须有确切的定义; ③输入项(Input):一个 ...
分类:编程语言   时间:2019-12-19 23:45:09    阅读次数:141
分治算法(1)N!个数为0的情况
题目地址 https://www.cnblogs.com/hao-tian/p/9274708.html #include<iostream> #include<stdio.h> #include<stdlib.h> #include<math.h> #include<algorithm> usin ...
分类:编程语言   时间:2019-12-19 15:57:35    阅读次数:85
AE2ACE coursework
AE2ACE coursework 2019-2020This coursework is worth 25% of the final mark.Stock Trading & Algorithm Correctness.Deadline: 29 November 2019 16:00Part I ...
分类:其他好文   时间:2019-12-19 13:19:05    阅读次数:72
贪吃蛇代码(转)
双人博弈贪吃蛇游戏 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #include <algorithm> 5 #include <jsoncpp/json.h> 6 #include <cmath> 7 #incl ...
分类:其他好文   时间:2019-12-19 13:08:32    阅读次数:71
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!