06 2017 档案
摘要:142. Linked List Cycle II Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the link
阅读全文
摘要:数据结构——Trie树 概念 Trie树,又称字典树、前缀树,是一种树形结构,是一种哈希树的变种。典型应用是用于统计,排序和保存大量的字符串(但不仅限于字符串),所以经常被搜索引擎系统用于文本词频统计。它的优点是:利用字符串的公共前缀来减少查询时间,最大限度地减少无谓的字符串比较,查询效率比哈希树高
阅读全文
摘要:动态规划经典题之最长公共子序列 参考: "最长公共子序列与最长公共子串" 概念 最长公共子序列: 两个字符串中相同的子串序列,可以不连续。 最长公共子串: 两个字符串中相同的连续子串。 这两者的区别就在于子串是否需要连续。 状态转移方程 最长公共子串: 我们记c[i, j]为x和y在长度为i和j时的
阅读全文
摘要:583. Delete Operation for Two Strings Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, whe
阅读全文

浙公网安备 33010602011771号