leetcode
文章平均质量分 96
Hearod
这个作者很懒,什么都没留下…
展开
-
Closest Point Problem
Text and figures are summrized from the book - Data Structure and Algorithm Analysis in C++ Ch.10.2.2. Code are referred from Rosetta Code. Given N points in a plane, the closest pair of points can be found in O(NlogN)O(N log N)O(NlogN) time. exhaustive s原创 2021-04-24 06:56:41 · 245 阅读 · 0 评论 -
Leetcode 5. Longest Palindromic Substring - Manacher‘s Algorithm
Manacher’s Algorithm Reference:Link1(BIT祝威), Link2。图片及部分文字陈述参考自Link1, 数学推导参考自Link2。 Introduction Given a string S with the length of N. 化一般为特殊。 在字符串S的每个字符之间以及S的首位都插入一个特殊字符,该字符绝不会在S中出现,比如"#"。得到字符串T。T.length=2N+1T.length = 2N+1T.length=2N+1。 例如: S=“abaaba”原创 2020-08-31 07:05:06 · 360 阅读 · 1 评论