Implementation of popular data structures in java