0% found this document useful (0 votes)
13 views2 pages

Essential Coding Interview Problems

The document lists various programming challenges and algorithms, including array manipulation, linked list operations, tree traversals, graph algorithms, and sorting techniques. Each item outlines a specific problem or task, such as reversing an array, finding the maximum product subarray, and implementing an LRU cache. The challenges cover a wide range of data structures and algorithms, suitable for enhancing coding skills.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Essential Coding Interview Problems

The document lists various programming challenges and algorithms, including array manipulation, linked list operations, tree traversals, graph algorithms, and sorting techniques. Each item outlines a specific problem or task, such as reversing an array, finding the maximum product subarray, and implementing an LRU cache. The challenges cover a wide range of data structures and algorithms, suitable for enhancing coding skills.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Programs :

1. Reverse an array without using extra space


2. Find the maximum product subarray
3. Longest substring without repeating characters
4. Rotate an array (using reversal algorithm or deque)
5. Detect and remove loop in a linked list
6. Merge two sorted linked lists
7. Reverse a linked list recursively
8. LRU Cache using Linked List + HashMap
9. Implement a queue using two stacks
[Link] a postfix expression
[Link] the next greater element for each element in array (use stack)
[Link] window maximum (Deque/Heap approach)
[Link] / Preorder / Postorder traversal
[Link] if a binary tree is balanced
[Link] Binary Tree to DLL
[Link] Common Ancestor (LCA) in BST
[Link] and DFS traversal
[Link] cycle in an undirected/directed graph
[Link] of islands (matrix-based DFS)
[Link]’s algorithm (basic priority queue implementation)
21.N-Queens problem
[Link] and permutations generation
[Link] Solver
[Link] Search in a matrix
[Link] Search variations (first/last occurrence)
[Link] Sort & QuickSort (recursive implementation)
[Link] largest element using heap
[Link] Inversions using Merge Sort
[Link] a function to check if a binary tree is balanced.
[Link] code to find the first non-repeating character in a string.
[Link] an LRU (Least Recently Used) Cache.
[Link] a 2D matrix of 1s and 0s, count the number of islands (connected
1s)
[Link] a function to detect a cycle in a directed graph using DFS.
[Link] an array and a target, return indices of the two numbers that add up
to the target
[Link] a linked list such that nodes follow first-last-second-
secondLast... pattern.
[Link] Min Heap to merge multiple sorted linked lists
[Link] HashMap + Heap to find the most frequent k elements.
[Link] binary search to find a peak element in an array.
[Link] the number of subarrays that sum to a given value.
[Link] a reference to a node, return a deep copy of the entire graph.
[Link] an unsorted array, find the length of the longest consecutive
elements sequence in O(n) time.

[Link] Graph - Given a reference to a node, return a deep copy of the


entire graph.
[Link] Schedule (Topological Sort) - Determine if you can finish all
courses given prerequisites.
[Link] of Two Sorted Arrays - Efficient merge logic with
O(log(min(n,m))) complexity.
[Link] Rain Water - Find water units trapped after raining using two-
pointer or stack approach.
[Link] of Elements in Array - Count how many times each element
appears using a dictionary.
[Link] String Conversion - Print a string in a zigzag pattern given a
number of rows.
[Link] of Nodes with Only One Child in Binary Tree - Traverse the tree
and sum the value of nodes having exactly one child.
[Link] Missing Number in Array - Given n-1 numbers from 1 to n, find
the missing one.
[Link] Order Matrix Traversal - Print a 2D matrix in spiral (clockwise)
order.

You might also like