When I started programming, data structures and algorithms felt like something only needed for interviews. Practicing them consistently changed how I think about every problem I solve at work.
How I started
My CSE Fundamentals course at Phitron gave me a strong base: arrays, linked lists, stacks, queues, trees and graphs. The key was not memorizing solutions, but understanding why each structure exists.
My practice routine
- Solve one or two problems every day instead of many on weekends
- Read the problem twice and write the approach before coding
- Analyze time and space complexity for every solution
- Revisit problems I failed after a week
A pattern I use all the time
Using a hash map to trade memory for speed shows up everywhere — from interview problems to real API code.
function twoSum(nums: number[], target: number) {
const seen = new Map<number, number>();
for (let i = 0; i < nums.length; i++) {
const need = target - nums[i];
if (seen.has(need)) return [seen.get(need)!, i];
seen.set(nums[i], i);
}
return [];
}What it changed for me
Today, when an endpoint is slow, I naturally ask: what's the complexity here? Can a better data structure remove a nested loop? That habit came directly from DSA practice.
“Consistency beats intensity. Small daily practice compounds faster than you expect.”



