50 Coding Patterns Every Placement Student Must Know (With Examples)

Posted on: Thu Jun 19 2025

  1. Two Pointers

  2. Sliding Window

  3. Fast & Slow Pointer

  4. Merge Intervals

  5. Binary Search

  6. Hashing/Frequency Map

  7. Prefix Sum

  8. Stack-Based Pattern

  9. Recursion + Backtracking

  10. Bit Manipulation

  1. Greedy Algorithm

  1. Dynamic Programming

  1. Union-Find (Disjoint Set)

  1. BFS (Breadth-First Search)

  1. DFS (Depth-First Search)

  1. Topological Sort

  1. Trie-Based Pattern

  1. Matrix Traversal

  1. Monotonic Stack

  1. Heap/Priority Queue

Kth Largest Element in an Array – Infosys

   21. In-place Reversal of Linked List

  1. Linked List Cycle Detection

  1. Flood Fill Algorithm

  1. Permutations and Combinations

  1. Subsets Pattern

  1. Rotate Array/String Pattern

  1. Minimum/Maximum in Sliding Window (Deque)

  1. Backtracking with Constraints

  1. Greedy with Sorting

  1. Segment Tree Pattern (Range Query)

  1. Kadane’s Algorithm

  1. Two Heaps

  1. Binarization Techniques

  1. Recursive Tree Traversals

  1. Iterative Tree Traversals

  1. LCA (Lowest Common Ancestor)

  1. Diameter of a Tree

  1. Count Paths Pattern

  1. Graph Coloring

  1. K-way Merge

  1. Cycle Detection in Graph

  1. Top K Elements Pattern

  1. Jump Game / Reachability

  1. Median in Stream (Two Heap)

  1. Longest Palindromic Substring

  1. Rabin Karp / Rolling Hash

  1. Shortest Path Algorithm (Dijkstra)

  1. Bellman-Ford Algorithm

  1. Floyd Warshall Algorithm

  1. Minimax / Game Theory Pattern

Predict the Winner – Infosys SP Role