算法
文章平均质量分 79
孤独考拉
Github:https://github.com/Jackson-run
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
红黑树的基本性质
红黑树的基本性质1) 每个节点或是红色的,或是黑色的。2) 根节点是黑色的。 3) 每个叶节点(NIL)是黑色的。4) 如果一个节点是红色的,则它的两个子节点都是黑色的。 5) 对每个节点,从该节点到其所有后代叶节点的简单路径上,均包含相同数目的黑色节点。红黑树插入时,如果插入红色节点则:(由于插入黑色节点一定会导致性质五被破坏,所以考虑插入为红色节点的情况)性质一不会破坏性...原创 2018-11-25 21:30:47 · 1053 阅读 · 0 评论 -
Leetcode 之 Longest Common Prefix
Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "".Example 1:Input: [“flower”,“flow”...原创 2018-11-25 21:45:06 · 295 阅读 · 0 评论 -
Leetcode 之 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 answer.Example ...原创 2018-11-25 21:45:45 · 341 阅读 · 0 评论
分享