Important Programs & DSA Topics for Campus Placement
Basic Programs (C / Java / Python)
- Factorial of a number
- Prime number check
- Palindrome check (string/number)
- Armstrong number
- Fibonacci series (iterative & recursive)
- Swapping two numbers (with and without temp)
- Reverse a number / string
- Sum of digits of a number
- LCM and GCD of two numbers
- Check leap year
Array Programs
- Find largest/smallest element in array
- Second largest element
- Reverse an array
- Check if array is sorted
- Left/Right rotate an array (by k steps)
- Remove duplicates from array
- Frequency of elements in array
- Kadane's Algorithm (Maximum subarray sum)
- Sort 0s, 1s, 2s (Dutch National Flag Algorithm)
- Merge two sorted arrays
String Programs
- Reverse a string
- Check if string is palindrome
- Anagram check
- Count vowels/consonants/words
- Remove duplicate characters
- Frequency of characters
- Find longest substring without repeating characters
- String compression
- Check for rotation of strings
- Valid parentheses (stack-based)
Searching and Sorting
- Linear search
- Binary search (recursive & iterative)
- Bubble sort
- Selection sort
- Insertion sort
- Merge sort
- Quick sort
- Counting sort
- Heap sort
- Radix sort
Linked List
- Insert, delete (beginning, end, specific position)
- Reverse a linked list
- Detect loop in linked list
- Find middle element
- Merge two sorted linked lists
- Remove duplicates
- Check if palindrome
- Intersection point of two lists
- Detect and remove loop
- Nth node from end
Stack and Queue
- Implement stack using array/linked list
- Implement queue using array/linked list
- Implement stack using two queues
- Implement queue using two stacks
- Next greater element
- Balanced parentheses
- LRU cache
- Circular queue
- Min stack
- Prefix/Infix/Postfix evaluation
Tree / Binary Tree / BST
- Inorder, Preorder, Postorder traversal
- Level order traversal
- Height of tree
- Check balanced binary tree
- Lowest Common Ancestor
- Mirror a binary tree
- Check if two trees are identical
- Diameter of a tree
- Check BST validity
- Insert/search in BST
Greedy / Recursion / Backtracking
- Tower of Hanoi
- N-Queens problem
- Rat in a maze
- Knapsack (0/1)
- Coin change problem
- Job scheduling
- Activity selection
- Subset generation
- Permutation of string/array
- Sudoku solver
Graph
- DFS and BFS
- Detect cycle (DFS/BFS)
- Topological sort
- Shortest path (Dijkstra's Algorithm)
- Minimum Spanning Tree (Prim's/Kruskal's)
- Flood fill
- Graph coloring
- Union Find (Disjoint Set)
- Number of islands
- Bellman-Ford algorithm