Collections
Introduction to ArrayList
Description: Create an ArrayList of integers, add elements to it, and print its contents.
Introduction to LinkedList
Description: Create a LinkedList of strings, add elements to it, and print its contents.
Introduction to HashSet
Description: Create a HashSet of strings, add elements to it, and print its contents.
Introduction to HashMap
Description: Create a HashMap with integer keys and string values, add elements to it, and print its contents.
Iterating Over a Collection
Description: Iterate over elements in a collection (ArrayList, LinkedList, HashSet, etc.) and print each element.
Removing Elements from Collection
Description: Remove specific elements from a collection (ArrayList, LinkedList, HashSet, etc.) and print the modified collection.
Checking Element Existence
Description: Check if a specific element exists in a collection (ArrayList, LinkedList, HashSet, etc.) and print the result.
Finding Maximum Element
Description: Find the maximum element in a collection (ArrayList, LinkedList, HashSet, etc.) and print it.
Finding Minimum Element
Description: Find the minimum element in a collection (ArrayList, LinkedList, HashSet, etc.) and print it.
Sorting Elements in Collection
Description: Sort elements in a collection (ArrayList, LinkedList, HashSet, etc.) and print the sorted collection.
Implementing Custom Object Sorting
Description: Create a custom class (e.g., Student) with multiple attributes and implement Comparable or Comparator interface to enable sorting of objects based on specific attributes.
Implementing Stack
Description: Implement a stack data structure using collections (ArrayList or LinkedList) and perform push and pop operations.
Implementing Queue
Description: Implement a queue data structure using collections (LinkedList) and perform enqueue and dequeue operations.
Implementing Priority Queue
Description: Implement a priority queue data structure using collections (PriorityQueue) and perform insert and remove operations based on priority.
Performing Set Operations
Description: Perform set operations (union, intersection, difference) on two sets using collections (HashSet).
Performing Map Operations
Description: Perform map operations (merge, compute, iterate) on a map using collections (HashMap).
Implementing TreeMap
Description: Implement a tree map data structure using collections (TreeMap) and perform operations like insertion, deletion, and traversal.
Last updated