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
然而这只是 70pts 的部分分,考场上没想到满分怎么做(现在也不会) code: #include <cstdio> #include <string> #include <stack> #include <queue> #include <cstring> #include <algorithm ...
分类:
编程语言 时间:
2019-12-21 09:30:03
阅读次数:
81
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
点云的搜索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
题目地址 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 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