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 โEach topic below maps directly to problems in the practice judge โ learn the idea, then immediately solve.
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.
Strings are arrays of characters with extra tricks: frequency counting, palindromes, anagrams, and sliding windows. Service-company coding rounds are ~40% string problems.
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.
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.
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.
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.
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.
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.
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.
The one table to memorize before any technical interview.
| Structure / Algorithm | Access | Search | Insert | Delete | Notes |
|---|---|---|---|---|---|
| Array | O(1) | O(n) | O(n) | O(n) | Insert/delete shift elements |
| HashMap | โ | O(1)* | O(1)* | O(1)* | *average case |
| Linked List | O(n) | O(n) | O(1) | O(1) | O(1) if you have the node |
| Stack / Queue | O(n) | O(n) | O(1) | O(1) | Only at the ends |
| Binary Search | โ | O(log n) | โ | โ | Sorted data only |
| Bubble / Insertion Sort | โ | โ | O(nยฒ) | Fine for tiny inputs | |
| Merge / Quick Sort | โ | โ | O(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 |
2 hours a day. By week 6 you're ready for any service-company round and most product-company screens.
Learn traversal, reversal, frequency counting. Solve problems 1โ10 in the practice judge (all Easy). Aim for 2 per day.
Re-solve Two Sum and Anagram using maps in O(n). Then Move Zeroes and Remove Duplicates with two pointers.
Valid Parentheses, then Reverse Linked List. Draw the pointer diagrams on paper โ never solve linked lists in your head.
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.
Longest Substring, Max Subarray (Kadane), Climbing Stairs, Fibonacci iteratively. These four unlock half of all Medium problems.
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.
DSA pairs with everything else on this site: