![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Algorithm
文章平均质量分 91
大爱助手
这个作者很懒,什么都没留下…
展开
-
简单多边形内的最短路径树算法
简单多边形内的最短路径树算法前言字母定义性质算法准备算法前言本文主要介绍<< Linear-time algorithms for visibility and shortest path problems inside simple polygons >>中计算多边形内所有顶点距离多边形内一点的最短路径树的线性算法字母定义简单多边形 PPP顶点个数 nnn给定的源点 sss对于PPP中的每个顶点 vvvπ(s,v)\pi(s,v)π(s,v)表示从s到v的最短欧几里原创 2021-11-12 15:11:39 · 889 阅读 · 0 评论 -
《Introduction to Algorithm》22.2-8
今天复习看到一题,试着证明了一下,题目简洁很有意思.The diameter of a tree T = (V,E) is defined as maxu,v∈Vδ(u,v)max_{u,v\in V}\delta(u,v)maxu,v∈Vδ(u,v) , that is, the largest of all shortest-path distances in the tree. Giv...原创 2019-12-17 17:50:07 · 183 阅读 · 0 评论 -
两个简单多边形求交(CGAL)
两个多边形求交的实现需要几个模块(cgal中有insect函数,但是必须要求使用CGAL::Exact_predicates_exact_constructions_kernel)本人出于其他想法,没有把基于Exact_predicates_inexact_constructions_kernel核的Polygon_2转换为Exact_predicates_exact_constructio...原创 2019-10-22 17:05:35 · 2693 阅读 · 0 评论 -
LeetCode Day.04 Regular Expression Matching
一道标准的NFA题题目描述Given an input string (s) and a pattern §, implement regular expression matching with support for ‘.’ and ‘*’.‘.’ Matches any single character.‘*’ Matches zero or more of the precedin...原创 2019-04-19 00:36:28 · 134 阅读 · 0 评论 -
LeetCode Day.06 关于二进制与位运算的总结
background之前一段时间遇到了Leetcode中一些比较简单的题目,但是有一些的最优解决方案是通过位运算实现的,即简洁又高效。本节整理下c++中关于二进制以及位运算的基本知识,以及在算法中的相关应用。Menu(Share) A summary: how to use bit manipulation to solve problems easily and efficiently...原创 2019-04-26 21:02:48 · 153 阅读 · 0 评论 -
LeetCode Day.03 Longest Palindromic Substring
这道题花了好长时间题目描述Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example 1:Input: “babad”Output: “bab”Note: “aba” is also a valid a...原创 2019-04-17 23:49:04 · 89 阅读 · 0 评论 -
LeetCode Day.02 Longest Substring Without Repeating Characters
题目描述Given a string, find the length of the longest substring without repeating characters.Example 1:Input: “abcabcbb”Output: 3Explanation: The answer is “abc”, with the length of 3.Example 2:In...原创 2019-04-17 12:50:31 · 104 阅读 · 0 评论 -
LeetCode Day.01 Two Sum
闲来无事,做下LeetCode的题,提升下算法题目描述Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, a...原创 2019-04-16 21:12:22 · 107 阅读 · 0 评论 -
LeetCode Day.05 Integer to Roman
题目描述Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D ...原创 2019-04-20 22:26:39 · 104 阅读 · 0 评论 -
山东大学 Computational Geometry 2019年 期末考试
Summary of Computational Geometry Course明天下午 Computational Geometry 期末考试,再次总结下这门课程作为个人的再次复习。课程成绩为最后的期末考试成绩。以下内容包括教材信息以及各章节的内容总结刚刚考完,附上回忆版试题Textbook 《计算几何及应用》 by 汪嘉业 Temporary Link:[Buy PDF] Ch...原创 2019-04-01 12:46:20 · 908 阅读 · 2 评论 -
Hololens Anchor 自动布局(三)—— Black Hole Algorithm For SCP
Background熬夜熬死了要~总之昨夜发现了一个据说对SCP效果特棒的启发性算法-黑洞算法Paper :Black Hole Algorithm For SCP具体有多好,见图:Instance代表的数据采自 J.E.Beasley 的 OR-LibraryInstances For Set Covering (OR-Library)这个结果已经远远超过了蚁群算法(ACO)的效...原创 2019-01-21 13:59:00 · 301 阅读 · 0 评论 -
山东大学 Random Algorithm 2019年 期末考试
Summary of Random Algorithm Course 明天下午Random Algorithm 期末考试,再次总结下这门课程作为个人的再次复习。课程成绩包括平时的个人报告成绩以及最后的期末考试成绩。以下内容包括教材信息以及各章节的内容总结,以及本人对第四章的课堂报告Textbook 《Probability and Computing (Randomized Algorit...原创 2019-01-09 16:41:38 · 887 阅读 · 5 评论 -
山东大学 Design and Analysis of Algorithm 2019年 期末考试
Summary of Course如题,后天上午期末考试,因课表冲突不得不突击复习,以下内容包括教材信息以及重点分析 (本科学过图论算法,简单的概念和证明以及本人熟悉的部分一带而过)Textbook《Introduction to Algorithm (Third Edition)》by Thomas H. Cormen,Charles E. Leiserson, Ronald L. Riv...原创 2020-01-10 23:51:04 · 961 阅读 · 2 评论 -
《Introduction to Algorithm》22.4-2
Description for 22.4-2Solutions for 22.4-2第22章第4节讲述了拓扑排序的应用,最直观的做法是先利用拓扑排序对图22.8进行DFS从而获得一个拓扑序列T,之后从t开始依次向前扫描处理直到s (利用了有向无环图中无环即无反向边的性质)下图为其中一个拓扑排序:算法一 (求p到v的简单路径数): 1)将所有节点赋值num=0,v赋值num=...原创 2019-01-10 16:04:39 · 362 阅读 · 5 评论