Archive for category Collections / Data Structures

Bubble Sort in Java

Bubble Sort is a generic algorithm to sort the elements and can be implemented in any programming language. The algorithm gets its name from the way smaller elements “bubble” to the top of the list. it is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair […]

, , ,

Leave a comment

Collections

Important Interfaces and classes in the Collections Framework Interfaces: Collections Set SortedSet List Map SortedMap Queue NavigableSet NavigableMap   Concrete core 13 Implementation Classes Maps HashMap HashTable TreeMap LinkedHashMap Sets HashSet LinkedHashSet TreeSet Lists ArrayList Vector LinkedList Queues PriorityQueue Utilities Collections Arrays Not all collections implement the Collection interface eg. none of the map related […]

, , , , , , ,

Leave a comment

How to work with java6’s Navigable Set and Navigable Map

NavigableSet and NavigableMap Interfaces were included in Java6’s Collection API. TreeSet and TreeMap are the Classes that implement these Interfaces. Output is :

, , , , , , ,

Leave a comment