上一页 1 ··· 66 67 68 69 70 71 72 73 74 ··· 76 下一页
摘要: /** * <p> * Abstract binary search tree implementation. Its basically fully implemented * binary search tree, just template method is provided for cre 阅读全文
posted @ 2021-10-13 18:31 Tianyiya 阅读(38) 评论(0) 推荐(0)
摘要: /** * * Abstract class for self balancing binary search trees. Contains some methods * that is used for self balancing trees. * * @author Ignas Lelys 阅读全文
posted @ 2021-10-13 18:30 Tianyiya 阅读(50) 评论(0) 推荐(0)
摘要: public class SizeBalancedTreeMap { public static class SBTNode<K extends Comparable<K>, V> { public K key; public V value; public SBTNode<K, V> left; 阅读全文
posted @ 2021-10-13 18:29 Tianyiya 阅读(46) 评论(0) 推荐(0)
摘要: /** * <p> * AVL tree implementation. * <p> * In computer science, an AVL tree is a self-balancing binary search tree, and * it was the first such data 阅读全文
posted @ 2021-10-13 18:29 Tianyiya 阅读(54) 评论(0) 推荐(0)
摘要: import java.util.ArrayList; public class SkipListMap { // 跳表的节点定义 public static class SkipListNode<K extends Comparable<K>, V> { public K key; public 阅读全文
posted @ 2021-10-13 18:28 Tianyiya 阅读(62) 评论(0) 推荐(0)
摘要: import java.util.ArrayList; public class SizeBalancedTreeMap { public static class SizeBalancedTreeMap<K extends Comparable<K>, V> { private int root; 阅读全文
posted @ 2021-10-13 18:26 Tianyiya 阅读(49) 评论(0) 推荐(0)
摘要: 链接 给你一个只包含 '(' 和 ')' 的字符串,找出最长有效(格式正确且连续)括号子串的长度。 class Solution { public static int longestValidParentheses(String s) { if (s == null || s.length() = 阅读全文
posted @ 2021-10-13 18:04 Tianyiya 阅读(16) 评论(0) 推荐(0)
摘要: 链接 假设农场中成熟的母牛每年只会生 1 头小母牛,并且永远不会死。第一年农场中有一只成熟的母牛,从第二年开始,母牛开始生小母牛。每只小母牛 3 年之后成熟又可以生小母牛。给定整数 n,求出 n 年后牛的数量。 f(1) = 1 f(2) = 2 f(3) = 3 f(n) = f(n - 1) + 阅读全文
posted @ 2021-10-13 17:25 Tianyiya 阅读(152) 评论(0) 推荐(0)
摘要: ![](https://img2020.cnblogs.com/blog/816759/202110/816759-20211013172040065-565032137.png) 阅读全文
posted @ 2021-10-13 17:21 Tianyiya 阅读(22) 评论(0) 推荐(0)
摘要: T(n) = aT(n/b) + f(n) ![](https://img2020.cnblogs.com/blog/816759/202110/816759-20211013171247255-32247565.jpg) 如快排, T[n] = 2T[n/2] + O(n) 其中O(n)为PART 阅读全文
posted @ 2021-10-13 17:13 Tianyiya 阅读(160) 评论(0) 推荐(0)
上一页 1 ··· 66 67 68 69 70 71 72 73 74 ··· 76 下一页