Implementation of Different Datastructures using Ruby