DSA Tutorial #15: Recursion and Backtracking — Think Before You Code

Recursion and backtracking are essential for solving problems where you need to explore all possibilities. Permutations, combinations, subsets, sudoku, and N-Queens all use backtracking. In this article, you will learn how recursion works, the backtracking template, and how to solve common interview problems. We show core examples in Kotlin, Python, and Go. What is Recursion? Recursion is when a function calls itself. Every recursive function has two parts: Base case: the condition that stops recursion Recursive case: the function calls itself with a smaller problem Python: ...

May 18, 2026 · 8 min

DSA Tutorial #14: Two Pointers and Sliding Window — Solve Array Problems in O(n)

Two pointers and sliding window are two of the most frequently tested techniques in coding interviews. They turn brute force O(n^2) solutions into elegant O(n) solutions. In this article, you will learn converging pointers, same-direction pointers, fast/slow pointers, and both fixed-size and variable-size sliding windows. We show core examples in Kotlin, Python, and Go. Two Pointers: Converging (Opposite Direction) Two pointers start at opposite ends of the array and move toward each other. ...

May 18, 2026 · 8 min

DSA Tutorial #13: Binary Search — Beyond the Basics

Binary search is one of the most powerful techniques in algorithm design. It reduces O(n) searches to O(log n) by cutting the search space in half at every step. In this article, you will learn the classic binary search, common templates, search on answer, and rotated array problems. We show every example in Kotlin, Python, and Go. Classic Binary Search Given a sorted array and a target value, find the target’s index or return -1. ...

May 17, 2026 · 8 min

DSA Tutorial #12: Sorting Algorithms — Quick Sort, Merge Sort, and More

Sorting is one of the most fundamental operations in computer science. Many problems become easier once the data is sorted — binary search, duplicate detection, and merge operations all require sorted input. In this article, you will learn the most important sorting algorithms, their trade-offs, and when to use each one. We show every example in Kotlin, Python, and Go. Why Sorting Matters Sorting unlocks other algorithms: Binary search requires sorted data — O(log n) instead of O(n) Two pointers on sorted arrays solve many problems efficiently Duplicate detection becomes O(n) on sorted data (just compare neighbors) Merge operations are faster on sorted inputs Interviewers often ask: “Can you sort the input first to simplify the problem?” ...

May 17, 2026 · 8 min

DSA Tutorial #11: Big O Notation — Time and Space Complexity Explained

Every coding interview expects you to analyze your solution’s efficiency. When the interviewer asks “What is the time complexity?” they want you to use Big O notation. In this article, you will learn what Big O is, how to calculate it from code, and how to compare different complexities. We show every example in Kotlin, Python, and Go. What is Big O Notation? Big O notation describes how an algorithm’s running time or space usage grows as the input size increases. It gives you the upper bound — the worst case scenario. ...

May 17, 2026 · 8 min

DSA Tutorial #10: When to Use Which Data Structure — Complete Guide

Choosing the right data structure is half the solution to any coding problem. In interviews, the first question is always: “What data structure should I use?” A wrong choice leads to slow solutions or unnecessary complexity. In this article, you will learn a decision framework for choosing the right data structure, see head-to-head comparisons, and get a complete cheat sheet you can reference any time. This article covers everything from our first 9 articles in the series. ...

May 16, 2026 · 8 min

DSA Tutorial #9: Union-Find — Grouping Connected Elements

Union-Find (also called Disjoint Set Union or DSU) is a data structure that tracks elements split into non-overlapping groups. It answers one question very fast: “Are these two elements in the same group?” It is the best tool for connected components problems and appears in many graph-related interview questions. In this article, you will learn how Union-Find works, why path compression makes it nearly O(1), and how to use it in coding interviews. ...

May 16, 2026 · 8 min

DSA Tutorial #8: Tries — The Data Structure Behind Autocomplete

Every time you type in a search bar and see suggestions appear, a trie is probably working behind the scenes. A trie (pronounced “try”) is a tree-like data structure designed for fast string operations. It is the go-to data structure for autocomplete, spell checkers, and word search problems. In this article, you will learn how tries work, how to build one from scratch, and how to use them in coding interviews. ...

May 15, 2026 · 7 min

DSA Tutorial #7: Graphs — Representation, BFS, and DFS

Graphs are one of the most powerful and versatile data structures in computer science. Social networks, maps, dependency systems, and the internet itself are all graphs. Graph problems appear frequently in coding interviews, especially at top tech companies. In this article, you will learn how to represent graphs, traverse them with BFS and DFS, detect cycles, and perform topological sort. We show every example in Kotlin, Python, and Go. What is a Graph? A graph is a collection of vertices (also called nodes) connected by edges. Unlike trees, graphs can have cycles, and nodes can connect to any other node. ...

May 15, 2026 · 9 min

DSA Tutorial #6: Heaps and Priority Queues — Always Get the Min or Max

A heap is a data structure that always gives you the smallest (or largest) element instantly. It powers priority queues, scheduling systems, and some of the most common interview patterns like “top K elements.” In this article, you will learn how heaps work, how to implement them, and how to use them in coding interviews. We show every example in Kotlin, Python, and Go. What is a Heap? A heap is a complete binary tree that satisfies the heap property: ...

May 14, 2026 · 9 min