【数据结构与算法】伸展树的Java实现
生活随笔
收集整理的這篇文章主要介紹了
【数据结构与算法】伸展树的Java实现
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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 創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的【数据结构与算法】伸展树的Java实现的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【VB.NET】测验题目Quiz1
- 下一篇: java美元兑换,(Java实现) 美元