Classic algorithms and data structures implemented in Java using Generics