Recently while practicing interval problems, I noticed something interesting:
A lot of interview questions are actually small twists of the same underlying pattern.
Take the classic Merge Intervals problem:
intervals = 1,3, 2,5, 6,8, 7,9
The fir...
A few years ago, machines were… decent at language.
They could read words. Predict next words.
But they didn’t really understand relationships.
They read like this:
➡️ One word at a time
➡️ Forgetting what came before
➡️ Struggling with long conte...
!http://Linear regression is often the first model we learn !http:// and the one we misuse the most.
Not because it’s complicated, but because it’s too easy to run.
A few lines of code, a decent score, and we move on.
But linear regression isn’t ju...
Most people think this is a “simple” problem.
Reverse an array.
But there are actually two very different ways to think about it
Approach 1: Let Python do the work
arr::-1
That’s it.
Looks clean. Works instantly.
But under the hood:
In ...
In DSA, some of the most elegant solutions come from simple ideas applied smartly. One such gem is Prefix Sum — a concept that can turn a brute force problem into an efficient one-liner.
Think of prefix sum like a running total that saves you from r...
Ever wondered how apps and games show instant totals—like scores, analytics, or stats without lag?
Behind that speed often hides a humble hero: Prefix Sum.
Imagine this:
You’ve got an array of numbers and multiple queries like:
“What’s the sum of v...
Array rotation is one of those deceptively simple problems that reveal how well you really understand arrays and modular arithmetic. Let’s explore intuitive, language agnostic ways to perform left and right rotations efficiently, without getting lost...
When we write algorithms, one of the key things to think about is how much memory our solution needs. You might have heard terms like “in-place” and “extra space” — but what do they really mean?
Let’s break it down simply
In-Place Algorithms
An i...
When we start learning to code, we often get excited about solving problems that work. But as we move forward, writing code that just works isn’t enough, we also need to think about how well it works. That’s where time and space complexity1 come in.
...
Finding Loops in a Linked List: Why It Matters
If you’ve ever dealt with linked lists in data structures, you’ve probably come across the famous problem: “How do you find if a linked list has a loop?”
At first glance, it may feel like one of those...
Hey friends,
I wanted to share something a little personal today, because I think a lot of us in tech can relate. Working in this field is exciting, but let’s be honest, it also comes with long hours, deadlines, screen fatigue, and that constant pre...
What powers your browser history, undo/redo in apps, or navigation between screens?
Behind the scenes → it’s the Linked List.1
And there are two key types you should know: Singly and Doubly Linked List.
Singly Linked List SLL:
Each node = data + ...
Have you ever zoomed into a photo on your phone, shrunk an image before sending it on WhatsApp, or stretched a design to make it fit a screen?
That simple action is powered by scaling and in machine learning, it’s one of the most important transform...
Do you know how everyday apps like Spotify’s playlist display or Instagram’s photo grid rely on a simple concept called an array?
That’s right. Behind the scenes, this unassuming data structure1 powers how data is stored, retrieved, and displayed al...
Do you know what actually happens when you run an SQL query?
It’s not as simple as: “SQL just fetches rows from a table.”
Behind the scenes, your query goes through a step-by-step execution order and knowing this is often an interview question for ...
Imagine your interviewer asks for a queue but with a twist: you can only use stacks.
It’s actually a small shift in approach that reveals how data structure thinking and algorithmic trade offs make you a stronger engineer.
Read on, this one probl...
Why Writing Efficient Code Still Matters Even in the Age of AI ?
We live in a time where you can ask an AI to write you code But If you aren’t comfortable reading and understanding that code, you can easily get stuck in the loop of:
“What’s wron...
Everyone loves to talk about “training models”… but the real magic happens before you even touch the model. Let’s walk through the pipeline every ML project goes through, from messy spreadsheets to clean, ready to train data.
First Step is Understa...
Have you ever seen those Russian dolls, where one doll opens to reveal a smaller one inside, and then another smaller one, and so on? Recursion in programming is a bit like that. It’s when a function calls itself to solve a smaller piece of the probl...
When I was building my music app in Flutter, I began with the “quick and dirty” way of handling data. You know that vibe coding flow — fetch some JSON, dump it in a Map, and just wire it up to the UI. It felt fast at first, but it quickly turned into...