DSA Basic Interview Topics for Freshers
1. Arrays
Basic operations: insert, delete, traverse
Reverse an array
Find min/max
Kadanes Algorithm (Max Subarray Sum)
Two pointer technique
Example: Find the second largest element in an array.
2. Strings
Palindrome check
Anagram check
String reversal
Substring problems
Character count/frequency
Example: Check if two strings are anagrams.
3. Linked Lists
Singly and Doubly Linked Lists
Insert/Delete nodes
Reverse a linked list
Detect loop (Floyds Cycle Detection)
Example: Reverse a linked list.
4. Stacks
Push/Pop operations
Balanced parentheses
Infix to Postfix conversion
Next Greater Element
Example: Check for balanced brackets.
5. Queues
Simple Queue, Circular Queue
Page 1
DSA Basic Interview Topics for Freshers
Deque (Double-ended queue)
Implement using stacks
Sliding Window problems
Example: Implement a queue using two stacks.
6. Recursion
Factorial, Fibonacci
Sum of digits
Backtracking basics (like N-Queens, Rat in a Maze)
Example: Print all subsets of a string using recursion.
7. Searching Algorithms
Linear Search
Binary Search (on sorted arrays)
Search in rotated sorted array
Example: Binary search in a sorted array.
8. Sorting Algorithms
Bubble Sort, Insertion Sort, Selection Sort
Merge Sort, Quick Sort
Time complexities
Example: Sort an array using Quick Sort.
9. Hashing
Hash tables, Hash maps
Frequency counting
Count distinct elements
Two sum problem
Example: Find if a pair with given sum exists in array.
10. Trees
Binary Tree and Binary Search Tree (BST)
Inorder, Preorder, Postorder traversals
Page 2
DSA Basic Interview Topics for Freshers
Height of tree
Lowest Common Ancestor (LCA)
Example: Check if two trees are identical.
11. Heaps
Min-Heap and Max-Heap
Heapify
Priority Queue
K largest/smallest elements
Example: Find the Kth largest element in an array.
12. Graphs (Basics)
Representations: Adjacency list/matrix
BFS and DFS
Cycle detection
Shortest path (Dijkstras Algorithm for advanced prep)
Example: Detect cycle in an undirected graph.
13. Greedy Algorithms
Activity selection
Fractional knapsack
Huffman coding
Example: Find minimum number of coins for change.
14. Dynamic Programming
Fibonacci using DP
0/1 Knapsack
Longest Common Subsequence (LCS)
Longest Increasing Subsequence (LIS)
Example: Find the length of longest increasing subsequence.
15. Bit Manipulation
Check even/odd
Page 3
DSA Basic Interview Topics for Freshers
Count set bits
Swap numbers without temp variable
Example: Check if a number is power of 2.
Page 4