- What is Data Structure?
A way of organizing and storing data efficiently for easy access and modification. - What is Algorithm?
A step-by-step procedure to solve a problem. - What is Time Complexity?
It measures how execution time grows with input size. - What is Space Complexity?
Memory used by an algorithm. - Define Big-O notation.
Represents worst-case complexity. - What is Big-Theta?
Represents average-case complexity. - What is Big-Omega?
Represents best-case complexity. - What is linear search?
Sequentially checking each element. - What is binary search?
Search in sorted array by dividing into halves. - Difference between array and linked list?
Array uses contiguous memory, linked list uses nodes. - What is recursion?
Function calling itself. - Base case in recursion?
Condition to stop recursion. - What is iterative approach?
Using loops. - What is divide and conquer?
Breaking problem into subproblems. - What is greedy algorithm?
Chooses best option at each step. - What is dynamic programming?
Solving problems using stored results. - What is stack?
LIFO structure. - What is queue?
FIFO structure. - What is heap?
Tree-based structure. - What is graph?
Collection of nodes and edges. - What is tree?
Hierarchical structure. - What is node?
Basic unit in data structures. - What is pointer?
Stores memory address. - What is sorting?
Arranging data in order. - What is searching?
Finding an element. - Best sorting algorithm?
Depends on use-case. - What is stable sorting?
Maintains order of equal elements. - What is in-place algorithm?
Uses constant extra space. - What is hashing?
Mapping data to fixed size values. - What is collision?
Two keys map to same index. - What is load factor?
Ratio of filled slots. - What is adjacency matrix?
Graph representation. - What is adjacency list?
List-based graph representation. - What is DFS?
Depth-first search. - What is BFS?
Breadth-first search. - What is recursion stack?
Stack used in recursion. - What is tail recursion?
Recursive call at end. - What is memoization?
Storing computed results. - What is tabulation?
Bottom-up DP approach. - What is backtracking?
Try all possibilities. - What is NP problem?
Non-deterministic polynomial problem. - What is amortized analysis?
Average cost over operations. - What is brute force?
Trying all possibilities. - What is recursion tree?
Visualization of recursion calls. - What is greedy choice property?
Local optimum leads to global optimum. - What is optimal substructure?
Problem can be divided into subproblems. - What is sliding window?
Technique for subarray problems. - What is two-pointer technique?
Using two indices. - What is prefix sum?
Cumulative sum array. - What is suffix sum?
Reverse cumulative sum.
🔹 PART 2: ARRAYS (Q51–Q100)
- What is an array?
Collection of elements stored in contiguous memory. - Advantages of arrays?
Fast access using index. - Disadvantages?
Fixed size. - How to find largest element?
Traverse array and compare. - Find smallest element?
Traverse and compare. - Reverse array?
Swap elements from both ends. - Check if sorted?
Compare adjacent elements. - Find second largest?
Track max and second max. - Remove duplicates?
Use set or two-pointer. - Rotate array?
Use reversal algorithm. - Left rotate?
Shift elements left. - Right rotate?
Shift elements right. - Find missing number?
Sum formula or XOR. - Find duplicates?
Use hashing. - Maximum subarray sum?
Kadane’s Algorithm. - Move zeros to end?
Two-pointer approach. - Union of arrays?
Combine unique elements. - Intersection?
Common elements. - Longest subarray with sum K?
Use hashmap. - Sort array?
Use sorting algorithms. - Merge two arrays?
Combine and sort. - Find pair with sum?
Two-pointer or hashmap. - Majority element?
Boyer-Moore algorithm. - Stock buy sell?
Track min price. - Find peak element?
Compare neighbors. - Search in rotated array?
Modified binary search. - Find equilibrium index?
Prefix and suffix sum. - Count inversions?
Merge sort method. - Product of array except self?
Prefix & suffix product. - Trapping rain water?
Two-pointer approach. - Maximum product subarray?
Track max & min. - Find subarray with 0 sum?
Hashmap. - Longest consecutive sequence?
Use set. - Minimum swaps?
Cycle detection. - Rearrange positive negative?
Partition method. - Next permutation?
Lexicographic approach. - Find repeating and missing?
Math or XOR. - Check palindrome array?
Compare ends. - Count subarrays?
n(n+1)/2. - Split array?
Divide into parts. - Find kth largest?
Heap or sorting. - Median of array?
Sort and pick middle. - Find frequency?
Hashmap. - Sliding window max?
Deque. - Minimum window size?
Two-pointer. - Longest unique subarray?
Set. - Binary search on array?
Divide into halves. - Check subset?
Use hashing. - Find triplets sum?
Two-pointer. - 4-sum problem?
Nested loops + two-pointer. - Find maximum difference?
Track min element.
📢 Join Our WhatsApp Channel
💼 Get Daily IT Job Updates, Interview Preparation Tips & Instant Alerts directly on WhatsApp.
👉 Join WhatsApp Now📢 Join Our Telegram Channel
💼 Get Daily IT Job Updates, Interview Tips & Exclusive Alerts directly on Telegram!
👉 Join Telegram