implementations of data structures in java and C