Sunday, June 22, 2025

LEETCODES IMPORTANT INTERVIEW QUESTIONS

 1. Two Sum (Array, Hash Table)

Problem: Given an array of integers nums and an integer target, return indices of the two numbers that add up to target.

2. Valid Parentheses (Stack)

Problem: Check if a string containing '('')''{''}''['']' is valid.

3. Merge Two Sorted Lists (Linked List)

Problem: Merge two sorted linked lists into one sorted list.

4. Maximum Subarray (Dynamic Programming)

Problem: Find the contiguous subarray with the largest sum (Kadane's Algorithm).

5. Binary Tree Level Order Traversal (BFS)

Problem: Return the level order traversal of a binary tree.

6. Longest Substring Without Repeating Characters (Sliding Window)

Problem: Find the length of the longest substring without repeating characters.

7. LRU Cache (Design)

Problem: Design an LRU (Least Recently Used) cache.

8. Merge Intervals (Sorting)

Problem: Merge overlapping intervals.

9. Word Break (DP)

Problem: Check if a string can be segmented into dictionary words.

10. Clone Graph (DFS/BFS)

Problem: Clone an undirected graph.

11. Top K Frequent Elements (Heap)

Problem: Return the top k frequent elements.