Reference :
Questions :
Array
- How to find the missing number in integer array of 1 to 100?
- How to find duplicate number on Integer array in Java?
- How to check if array contains a number in Java?
- How to find largest and smallest number in unsorted array?
- How to find all pairs on integer array whose sum is equal to given number?
- How to find repeated numbers in an array if it contains multiple duplicates?
- Write a program to remove duplicates from array in Java?
- How to sort an array in place using QuickSort algorithm? (
- Write a program to find intersection of two sorted arrays in Java?
- There is an array with every element repeated twice except one. Find that element?
- How to find kth smallest element in unsorted array?
- How to find kth largest element in unsorted array?
- How to find common elements in three sorted array?
- How find the first repeating element in an array of integers?
- How to find first non-repeating element in array of integers?
- How to find top two numbers from an integer array?
- How to find the smallest positive integer value that cannot be represented as sum of any subset of a given array?
- How to rearrange array in alternating positive and negative number?
- How to find if there is a sub array with sum equal to zero?
- How to remove duplicates from array in place?
- How to remove a given element from array in Java?
- How to merge sorted array?
- How to find sub array with maximum sum in an array of positive and negative number?
- How to find sub array with largest product in array of both positive and negative number?
- Write a program to find length of longest consecutive sequence in array of integers?
- How to find minimum value in a rotated sorted array?
- Given an array of of size n and a number k, find all elements that appear more than n/k times?
- How to reverse array in place in Java?
- Difference between array and linked list data structure?
- How to check if array contains a duplicate number?
- Reference1
- Array Tools
List
- What is the use of the List interface?
- What is ArrayList in Java?
- How would you convert an ArrayList to Array and an Array to ArrayList?
- How will you reverse a List?
- What do you understand by LinkedList in Java? How many types of LinkedList does Java support?
- Explain the Difference Between Linkedlist and Arraylist.
- What is a Vector in Java?
- What is the Stack class in Java and what are the various methods provided by it?
- Differentiate between an Array and an ArrayList.
- Differentiate between the Singly Linked List and Doubly Linked List.
- Differentiate between ArrayList and Vector.
- How to make Java ArrayList Read-Only?
- How to remove duplicates from ArrayList?
- How to sort ArrayList in descending order?
- How to synchronize ArrayList?
- When to use ArrayList and LinkedList?
- What are the important methods used in a linked list?
- Name the collection classes that implement random access interface
- How to join multiple ArrayLists?
- How to measure the performance of an ArrayList?
Map
- What is Map interface in Java?
- Why Map doesn’t extend the Collection Interface?
- List down the different Collection views provided by the Map interface in the Java Collection framework?
- Describe Various Implementations of the Map Interface and Their Use Case Differences.
- Hashmap Implemented in Java
- How Does Its Implementation Use Hashcode and Equals Methods of Objects
- What Is the Time Complexity of Putting and Getting an Element from Such Structure
- What Is the Purpose of the Initial Capacity and Load Factor Parameters of a Hashmap?What Are Their Default Values?
- What is the main benefit of using the Properties file?
- What is the ConcurrentHashMap in Java and do you implement it?
- Differentiate between HashMap and HashTable.
- Differentiate between HashMap and TreeMap.
- What is hash-collision in Hashtable and how it is handled in Java?
- What is the Dictionary class?
- What is IdentityHashMap?
- What is WeakHashMap?
- Explain map. entry In Map
- How to iterate map?
Set
- What is Set in Java Collections framework and list down its various implementations?
- What is the HashSet class in Java and how does it store elements?
- Can you add a null element into a TreeSet or HashSet?
- What Is the Difference Between Hashset and Treeset?
- Explain the emptySet() method in the Collections framework?
- What is LinkedHashSet in Java Collections Framework?
- Differentiate between HashSet and TreeSet.
- What are the methods of Java TreeSet class?
- Explain Linked HashSet
Queue
- What are the various methods provided by the Queue interface?
- What do you understand by BlockingQueue? (2)
- What is a priority queue in Java
- Differentiate between Queue and Deque.
Special Collection for Enum
- What Are the Benefits of Their Implementation Compared to Regular Collections?
Iterators
- What Is the Difference Between Fail-Fast and Fail-Safe Iterators
- What do you understand by Iterator in the Java Collection Framework?
- Differentiate between Iterable and Iterator.
- Differentiate between Iterator and Enumeration.
- Differentiate between Iterator and ListIterator.
General Collection Questions
- Describe the Collections Type Hierarchy, with a diagram
- What Are the Main Interfaces, and What Are the Differences Between Them?
- How Can You Use Comparable and Comparator Interfaces to Sort Collections?
- What are the advantages of the Collection Framework in Java?
- Why Collection doesn’t extend the Cloneable and Serializable interfaces?
- List down the major advantages of the Generic Collection.
- What is the need for overriding equals() method in Java?
- How the Collection objects are sorted in Java?
- Differentiate between Collection and Collections.
- Differentiate between Comparable and Comparator
- Differentiate between List and Set.
- Differentiate between Set and Map.
- Differentiate between List and Map.
- Differentiate between Queue and Stack.
- Differentiate between PriorityQueue and TreeSet.
- Differentiate between HashSet and HashMap.
- Differentiate between Iterable and Iterator.
- Differentiate between failfast and failsafe.
- How to synchronize List, Set and Map elements?
- Explain Big-O notation with an example
- Explain the best practices in Java Collection Framework
- What is the difference between stack and Queue?
- What is the difference between array and stack?
Generics
- List down the major advantages of the Generic Collection.
Reference – For collections
- baeldung – done
- edureka – done
- javapoint – done
- guru99 – done
- javarevisted
- journaldev
- dzone
- howtodoinjava
- javatpoint