Competitive Programming Guide

Basic Placement Preparation for Indian Students

Having been through many coding assessments and interviews, I've noticed some key concepts and problems repeat themselves. Whether you're preparing for university placements or coding interviews at MNCs and startups, this guide covers the most common topics you'll encounter.

Target Companies

Mass Recruitment Companies

TCS (Tata Consultancy Services)
Wipro
IBM
Infosys
Tech Mahindra
Cognizant
Capgemini
HCL Technologies
Accenture

Top 10 Must-Know Concepts

1. Recursion

Breaking a problem into smaller sub-problems with base condition. Asked in 80% interviews.

2. Sliding Window

Efficiently solving subarray problems by maintaining a window. Very common in arrays.

3. String Manipulation

Operations like reverse, substring, anagram detection. Basic requirement.

4. BFS (Breadth-First Search)

Layer-wise graph traversal for shortest path problems.

5. DFS (Depth-First Search)

Deep exploration in graphs/trees for connected components.

6. Dynamic Programming (DP)

Optimizing recursive problems by caching results.

7. Greedy Algorithms

Making best local decision at each step.

8. Two Pointer Technique

Working with sorted arrays using two index pointers.

9. Backtracking

Trying solutions recursively, undoing if necessary.

10. Binary Search

Searching in sorted array by dividing search space.

15 Must-Solve LeetCode Problems

# Concept Problem & Link
1 Recursion Max Depth Binary Tree - Problem 104
2 Sliding Window Longest Substring Without Repeat - Problem 3
3 String Manipulation Longest Palindrome - Problem 5
4 BFS Level Order Traversal - Problem 102
5 DFS Number of Islands - Problem 200
6 DP Maximum Subarray - Problem 53
7 Greedy Jump Game - Problem 55
8 Two Pointers 3 Sum Problem - Problem 15
9 Backtracking Permutations - Problem 46
10 Binary Search Basic Binary Search - Problem 704
11 Tree Traversal Inorder Traversal - Problem 94
12 OOP Java LRU Cache - Problem 146
13 SQL Second Highest Salary - Problem 176
14 Stack Valid Parentheses - Problem 20
15 Greedy Burst Balloons - Problem 452

Complete DSA Roadmap

Basic Data Structures

  • Arrays
  • Strings
  • Linked Lists
  • Stacks
  • Queues

Advanced Data Structures

  • Trees
    • Binary Trees
    • Binary Search Trees
    • AVL Trees
    • B-Trees
  • Graphs
    • Adjacency Matrix
    • Adjacency List
    • DFS & BFS
    • Shortest Path (Dijkstra, Bellman-Ford)
  • Heaps
  • Hash Tables
  • Union-Find
  • Tries
  • Segment Tree

Algorithmic Paradigms

  • Brute Force
  • Divide and Conquer
  • Greedy Algorithms
  • Dynamic Programming
  • Backtracking
  • Sliding Window
  • Two Pointer Technique

Problem-Solving Approach

Quick Hints - If you see:

Sorted Array Try: Binary Search, Two Pointers
All Permutations/Subsets Try: Backtracking
Tree Given Try: DFS, BFS
Graph Given Try: DFS, BFS
Linked List Try: Two Pointers
Max/Min Subarray Try: Dynamic Programming
Top/Least K Items Try: Heap, QuickSelect
Common Strings Try: Map, Trie

Emergency Tips

  • If everything fails → Try HashMap
  • Start with → Brute Force approach
  • Then optimize → Think of better time complexity
  • Draw it out → Visualize the problem on paper
  • Test with examples → Walk through your solution

Core Topics by Language

Java

  • Multithreading & Concurrency
  • Exception Handling
  • Collections Framework
  • Design Patterns (Singleton, Factory)
  • Stream API
  • Memory Management

JavaScript

  • Closures & Scope
  • Promises & Async/Await
  • Event Loop
  • Array Methods
  • Object Prototypes
  • ES6+ Features

SQL

  • JOIN Operations
  • Aggregate Functions
  • Subqueries
  • Database Design
  • Normalization
  • Index Optimization

Practice Platforms

Personal Note

Hey there! Just a little something from me to you..

Be regular in your practice - that's the most important thing in our line of work. If I can do LeetCode medium problems today and then take a break from coding for 3-4 months, I won't even be able to handle LeetCode easy problems later.

So, whatever time you can spend on coding, make sure you spend it consistently. Participating in weekly contests on platforms like GeeksforGeeks, LeetCode, CodeChef, or Codeforces will give you a reality check on your speed and efficiency.

All the very best for the upcoming placement season!