摘要: 1、NC19 子数组的最大累加和问题 import java.util.*; public class Solution { /** * max sum of the subarray * @param arr int整型一维数组 the array * @return int整型 */ publi 阅读全文
posted @ 2021-09-17 13:34 yub4by 阅读(49) 评论(0) 推荐(0)
摘要: 1、树的基本定义 2、树的相关术语 3、二叉树的基本定义 4、二叉查找树的创建 4.1 二叉树的结点类 private class Node { //存储键 public Key key; //存储值 private Value value; //记录左子结点 public Node left; / 阅读全文
posted @ 2021-09-17 09:55 yub4by 阅读(56) 评论(0) 推荐(0)
摘要: 1、符号表API设计 2、符号表实现 package cn.itcast.algorithm.symbol; public class SymbolTable<Key,Value> { //记录首结点 private Node head; //记录符号表中元素的个数 private int N; p 阅读全文
posted @ 2021-09-17 09:40 yub4by 阅读(35) 评论(0) 推荐(0)