ARRAYS
JAVA TYPES
LINKED LISTS
SORTING ALGORITHMS
SHORTEST PATH ALGORITHMS
200

This is the time complexity to access an element in an array by index.

What is O(1)?

200

This keyword is used to define a constant variable in Java.

What is final?

200

This is the time complexity to insert a node at the head of a singly linked list.

What is O(1)?

200

This simple sorting algorithm repeatedly swaps adjacent elements if they are in the wrong order.

What is Bubble Sort?

200

This algorithm finds the shortest path in an unweighted graph using a queue.

What is Breadth-First Search (BFS)?

400

This technique uses two indices moving toward each other, often used in sorted arrays to find pairs.

What is the two-pointer technique?

400

This type of class cannot be instantiated and may contain abstract methods.

What is an abstract class?

400

This algorithm detects a cycle in a linked list using two pointers moving at different speeds.

What is Floyd’s Cycle Detection Algorithm (Tortoise and Hare)?

400

This divide-and-conquer algorithm splits the array and merges sorted halves.

What is Merge Sort?

400

This algorithm finds the shortest path in a weighted graph with non-negative weights.

What is Dijkstra’s Algorithm?

600

This algorithm finds the maximum sum of a contiguous subarray in linear time.

What is Kadane’s Algorithm?

600

These are the 8 built-in primitive data types in Java.

What are byte, short, int, long, float, double, char, boolean?

600

This operation reverses a singly linked list iteratively.

What is reversing pointers using prev, current, next?

600

This is the average time complexity of QuickSort.

What is O(n log n)?

600

This algorithm can handle negative weights and detects negative cycles.

What is Bellman-Ford Algorithm?

800

This in-place algorithm rotates an array to the right by k steps using reversal.

What is the array reversal algorithm (reverse parts then whole)?

800

This is the difference between == and .equals() when comparing objects.

What is reference comparison vs value/content comparison?

800

This technique finds the middle node of a linked list in one pass.

What is the slow and fast pointer technique?

800

This sorting algorithm builds a heap and repeatedly extracts the maximum element.

What is Heap Sort?

800

This algorithm computes shortest paths between all pairs of nodes.

What is Floyd-Warshall Algorithm?

1000

This is the optimal time complexity to find the median of two sorted arrays.

What is
O(log(min(n, m)))?

1000

This concept allows a variable to refer to objects of different types at runtime.

What is polymorphism?

1000

This is the time complexity to find the kth node from the end using two pointers.

What is O(n)?

1000

This is the worst-case time complexity of QuickSort when the pivot selection is poor.

What is O(n²)?

1000

This technique improves Dijkstra by using heuristics to guide the search toward the goal.

What is the A* (A-star) algorithm?