http://grades.cs.technion.ac.il/Files/234122/Spring2014/hw/WCFiles/wet3_ADT.pdf