您当前的位置: 首页 >  数据结构与算法

星拱北辰

暂无认证

  • 0浏览

    0关注

    1205博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

【数据结构与算法】伸展树的Java实现

星拱北辰 发布时间:2020-02-26 22:55:17 ,浏览量:0

SplayTree

@see SplayTree

SplayTree功能介绍
  • void insert(x) → Insert x
  • void remove(x) → Remove x
  • boolean contains(x) → Return true if x is found
  • Comparable findMin() → Return smallest item
  • Comparable findMax() → Return largest item
  • boolean isEmpty() → Return true if empty; else false
  • void makeEmpty() → Remove all items
异常类

当集合容器为空的时候就不能够删除或获取元素,这时就会出现一种异常,命名为UnderflowException:

/**
 * Exception class for access in empty containers
 * such as stacks, queues, and priority queues.
 */
public class UnderflowException 
关注
打赏
1660750074
查看更多评论
立即登录/注册

微信扫码登录

0.0501s