Evaluate your comprehension of Data Structures and Algorithms with verified question banks across 138 algorithms. Validate runtime complexities, pointers, invariants, and edge cases.
Retrieves an element from an array using its index.
Directly accesses a random element in an array.
Visits every element in the array from start to finish.
Visits every element in the array from finish to start.
Visits elements within a specific start and end index range.
Insert an element at the start (index 0) of the array.
Insert an element at the end of the array.
Insert an element at a specific index.
Remove the first element (index 0) of the array.
Remove the last element of the array.
Remove an element from a specific index.
Find and remove the first occurrence of a specific value.
Replace the value stored at a specific array index.
Find matching values and update the selected occurrence.
Merge two sorted halves of an array while preserving sorted order.
Invert the order of all elements in the array.
Shift all elements to the left, wrapping the first element to the end.
Shift all elements to the right by k positions.
Remove duplicate elements from an array.
Sequentially check each element until a match is found.
Repeatedly divide the sorted search space in half.
Search a sorted array by jumping fixed-size blocks before a local scan.
Estimate the likely position of a target in uniformly distributed sorted data.
Repeatedly traverses the list, compares adjacent elements, and swaps them when they are out of order.
Divides the input list into two parts: a sorted sublist and an unsorted sublist.
Builds the final sorted array one item at a time.
Divide the unsorted list into n sublists, then repeatedly merge sublists to produce new sorted sublists.
Pick a pivot and partition elements around it recursively.
Sort by repeatedly extracting the root of a binary heap.
Sort integer keys by counting frequencies and rebuilding order.
Sort numbers digit by digit using a stable sub-sort.
Add an element to the top of the stack.
Remove the top element from the stack.
Check if brackets are balanced using a LIFO stack.
Convert infix expression to postfix using Shunting-Yard algorithm.
Evaluate arithmetic postfix expression using an operand stack.
Design a stack supporting push, pop, and retrieving minimum in O(1).
Find the first greater element to the right using a monotonic stack.
Compare Singly, Doubly, and Circular Linked Lists structure and node layouts.
Traverse a singly linked list from head to tail visiting each node.
Find a specific value in a Singly Linked List.
Insert a new node at the beginning of a Singly Linked List.
Insert a new node at the end of a Singly Linked List.
Delete the first occurrence of a specific value.
Traverse left subtree, visit node, traverse right subtree.
Visit node, traverse left subtree, traverse right subtree.
Traverse left subtree, traverse right subtree, visit node.
Visit every node on a level before going to a lower level.
Insert a new value into a Binary Search Tree maintaining the BST property.
Find a value in a Binary Search Tree.
Explore all neighbor nodes at the present depth before moving on to nodes at the next depth level.
Explore as far as possible along each branch before backtracking.
Find shortest paths from a source in a graph with non-negative edge weights.
Compute shortest paths with negative edges and detect negative cycles.
Construct Minimum Spanning Tree by sorting edges and using Union-Find.
Grow a Minimum Spanning Tree from an arbitrary root vertex.
Linear ordering of vertices in a DAG respecting directed dependencies.
Detect cycles in graphs via DFS: 3-color state classification for directed graphs and parent-edge tracking for undirected graphs.
Find all maximal connected subgraphs in an undirected graph.
Insert an element using separate chaining for collisions.
Search for an element in a separate chaining hash table.
Delete an element from a separate chaining hash table.
Insert an element using linear probing for collisions.
Search for an element in a linear probing hash table.
Delete an element using lazy deletion (tombstones).
Visit elements in a matrix row by row.
Visit elements in a matrix column by column.
Find a target in a matrix by checking each cell.
Walk the matrix boundaries inward in spiral order.
Search a sorted matrix from a corner using row and column ordering.
Flip rows and columns across the main diagonal.
Rotate a square matrix using transpose and row reversal.
Multiply compatible matrices using row-by-column dot products.
Add two matrices of the same dimensions element by element.
Subtract one matrix from another element by element.
Iterate through characters in a string from left to right.
Iterate through characters in a string from right to left.
Check if a string reads the same forwards and backwards.
Basic substring search using sliding window.
Knuth-Morris-Pratt pattern matching algorithm.
Pattern matching using rolling hashes.
Reverse character order with two pointers or a stack.
Insert a character into a string at a specific index.
Remove a character from a string at a specific index.
Replace a character at a specific index.
Toggle or change the case of characters in a string.
Directly access an element at a specific index.
Implement stack operations with an array and top pointer.
Read the top stack value without removing it.
Check whether the stack has no elements.
Check whether the stack has reached capacity.
Return the number of elements currently in the stack.
Model a FIFO queue with front and rear ends.
Reuse freed positions by wrapping front and rear pointers around the array.
Add an element to the rear of the queue.
Remove the front element from the queue.
Read the front queue value without removing it.
Inspect both front and rear queue values.
Traverse to a position and reconnect pointers around a new node.
Move the head pointer to remove the first node.
Reverse each next pointer until the list direction flips.
Use slow and fast pointers to find whether a cycle exists.
Traverse to second-to-last node and unlink the tail.
Find the middle node using slow and fast pointers in one pass.
Remove duplicate consecutive values from a sorted linked list.
Forward and backward traversal across doubly linked nodes.
Insert a node at the head of a doubly linked list in O(1).
Append a node at the tail of a doubly linked list in O(1).
Delete the head node of a doubly linked list in O(1).
Delete the tail node of a doubly linked list in O(1).
Reverse doubly linked list by swapping prev and next pointers in place.
Traverse a circular linked list until reaching the head node again.
Insert a node at head and rewire the tail's next pointer in O(1).
Append a node at tail and connect its next pointer to head in O(1).
Delete the head node of a circular linked list and update tail pointer.
Insert an element at the front of a double-ended queue.
Remove and return the element at the rear of a double-ended queue.
Insert into a sorted-array priority queue at the matching priority slot (shifts elements).
Remove the highest-priority element from a sorted-array priority queue (shifts remaining elements).
Insert into a heap and bubble upward to restore heap order.
Create character nodes along a word path in a prefix tree.
Build range-query nodes over intervals of an array.
Delete a node from a BST handling leaf, 1-child, and 2-child cases.
Rebalance AVL tree subtrees using single and double rotations.
Remove root element from max-heap and sift down to restore heap property.
Transform an unordered array into a valid max-heap in linear time.
Search for word or prefix character-by-character in a prefix tree.
Compute a bucket index with key modulo table size.
Hash a key and place its entry into the selected bucket.
Hash a key and inspect the bucket or probe path.
Remove an entry by key from a bucket or probing sequence.
Resolve collisions by checking the next table slot in sequence.
Resize the table and reinsert keys when load factor grows too high.
Add a unique key to the hash set.
Check whether a key exists in the hash set.
Remove a key while preserving probing/search behavior.
Combine all unique values from two sets.
Keep only values that appear in both sets.