This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
/** | |
* 大顶堆实现 | |
*/ | |
public class SimpleHeap { | |
public static void main(String[] args) { | |
SimpleHeap heap = new SimpleHeap(10); | |
heap.put(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
/** | |
* 2-3树实现/仅供学习使用 | |
* | |
* @author yangtianrui | |
*/ | |
public class TwoThreeTree { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 红黑树基础实现/递归版本/仅做学习用 | |
* | |
* @author yangtianrui | |
*/ | |
public class RBTree { | |
private static final boolean RED = true; | |
private static final boolean BLACK = false; |