Skip to content

Instantly share code, notes, and snippets.

@dmx2010
dmx2010 / Tree.scala
Created March 13, 2023 15:06 — forked from dholbrook/Tree.scala
Scala binary tree
/**
* D Holbrook
*
* Code Club: PO1
*
* (*) Define a binary tree data structure and related fundamental operations.
*
* Use whichever language features are the best fit (this will depend on the language you have selected). The following operations should be supported:
*
* Constructors
@dmx2010
dmx2010 / SkipListNode.java
Created April 20, 2013 15:50
A SkiplistSet implementation. It provides add/remove T as well as get/remove index based access. The SkiplistSet can be used as a base for TableModel with index based access.
package org.rivendell.collections;
import java.lang.reflect.Array;
public class SkipListNode<T extends Comparable<? super T>> {
private final T value;
private final SkipListNode<T>[] next;
/**
* this is to provide index based access