🧠 Data Structures & Algorithms

The #1 skill that decides your placement. Learn every core data structure with plain-English explanations, then prove it by solving real interview problems in our built-in online judge — no signup, everything free.

⚡ Start Solving Problems →
24
Practice Problems
9
Core Topics
100%
Free, No Login
Instant Test Feedback

Core Topics

Each topic below maps directly to problems in the practice judge — learn the idea, then immediately solve.

📊

Arrays

Beginner · Most asked in interviews

The foundation of everything. Contiguous memory, O(1) access by index. Interviews love array manipulation: traversals, in-place edits, prefix sums, and the two-pointer pattern.

TraversalTwo PointersPrefix SumKadane's
🔤

Strings

Beginner · TCS/Infosys favourite

Strings are arrays of characters with extra tricks: frequency counting, palindromes, anagrams, and sliding windows. Service-company coding rounds are ~40% string problems.

ReversalPalindromeAnagramSliding Window
🗺️

HashMaps & Sets

Beginner · The O(n) superpower

Key → value lookup in O(1). The single most useful interview tool: turns O(n²) brute-force into O(n). In JavaScript: Map, Set, or plain objects.

Frequency CountLookupDeduplication
📚

Stacks & Queues

Intermediate · CS3301 core

Stack = Last-In-First-Out (undo, brackets, recursion). Queue = First-In-First-Out (scheduling, BFS). The "valid parentheses" problem is asked in nearly every fresher interview.

LIFO / FIFOpush / popBracket Matching
🔗

Linked Lists

Intermediate · Pointer thinking

Nodes connected by pointers — O(1) insert/delete, O(n) access. Interviewers use linked lists to test whether you can reason about references. "Reverse a linked list" is the classic.

TraversalReversalFast/Slow Pointers
🔍

Searching

Intermediate · O(log n) magic

Linear search checks everything: O(n). Binary search halves the space each step: O(log n) — but only on sorted data. Off-by-one bugs here fail more interviews than any other topic.

LinearBinary Searchlo/hi Pointers
↕️

Sorting

Intermediate · Know the trade-offs

Bubble/Selection/Insertion are O(n²) teaching tools; Merge Sort and Quick Sort are the O(n log n) real deals. Interviews rarely ask you to write a full sort — they ask about the merge step and complexity trade-offs.

Merge SortQuick SortStability
🪟

Sliding Window & Two Pointers

Advanced · Product-company pattern

The pattern behind most "substring/subarray" problems. Maintain a moving window and shrink/grow it instead of re-checking everything — O(n²) becomes O(n). Zoho and Freshworks love these.

Window Expand/ShrinkSubstring Problems
🧩

Dynamic Programming

Advanced · Digital/Prime level

Break a problem into overlapping subproblems and remember answers. Start with Fibonacci and Climbing Stairs, then Coin Change. Needed for TCS Digital/Prime and product companies — not for Ninja-level rounds.

MemoizationBottom-updp[] tables

Big-O Cheat Sheet

The one table to memorize before any technical interview.

Structure / AlgorithmAccessSearchInsertDeleteNotes
ArrayO(1)O(n)O(n)O(n)Insert/delete shift elements
HashMapO(1)*O(1)*O(1)**average case
Linked ListO(n)O(n)O(1)O(1)O(1) if you have the node
Stack / QueueO(n)O(n)O(1)O(1)Only at the ends
Binary SearchO(log n)Sorted data only
Bubble / Insertion SortO(n²)Fine for tiny inputs
Merge / Quick SortO(n log n)Merge = stable; Quick = in-place
BST (balanced)O(log n)O(log n)O(log n)O(log n)Degrades to O(n) if skewed

Your 6-Week DSA Roadmap

2 hours a day. By week 6 you're ready for any service-company round and most product-company screens.

1

Week 1 — Arrays & Strings

Learn traversal, reversal, frequency counting. Solve problems 1–10 in the practice judge (all Easy). Aim for 2 per day.

2

Week 2 — HashMaps & Two Pointers

Re-solve Two Sum and Anagram using maps in O(n). Then Move Zeroes and Remove Duplicates with two pointers.

3

Week 3 — Stack, Queue & Linked List

Valid Parentheses, then Reverse Linked List. Draw the pointer diagrams on paper — never solve linked lists in your head.

4

Week 4 — Searching & Sorting

Binary Search until the off-by-ones stop biting. Implement the merge step. Understand why Quick Sort is O(n log n) average, O(n²) worst.

5

Week 5 — Sliding Window & Intro DP

Longest Substring, Max Subarray (Kadane), Climbing Stairs, Fibonacci iteratively. These four unlock half of all Medium problems.

6

Week 6 — Hard Problems & Mock Interviews

Coin Change, Product Except Self, Trapping Rain Water. Then do timed mocks: 2 problems in 45 minutes, explaining your approach out loud. Pair with our TCS NQT guide and interview question bank.

Keep Going

DSA pairs with everything else on this site: