May 29 · 18 min read · Your multi-agent system optimizes each step independently. Step-by-step cost minimization. But local optima destroy global efficiency. Save €0.10 per step, spend €100 extra total. I built a QualityCon
Join discussion
Nov 18, 2025 · 2 min read · Problem Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor g[i], which is the minimum size of a cookie that the child will be content with;...
Join discussionJul 15, 2025 · 4 min read · In Codechef Round 194 Div 4, there was one particular question that completely shattered my confidence. After failing to solve it during the contest, my brain froze — and I couldn’t think clearly for the remaining problems. But after calming myself d...
Join discussionJun 24, 2025 · 13 min read · Introduction Algorithms are fundamental to computer science and play a very important role in designing efficient solutions for various problems. Understanding algorithms, dating back to ancient civilisations, is essential for anyone interested in ma...
Join discussion
Jun 12, 2025 · 2 min read · 🚀 What I Learned Today Today, I explored one of the classic greedy algorithm problems — the Activity Selection Problem. This problem taught me how to use the greedy approach to solve scheduling tasks efficiently. 💡 Problem Statement You are given ...
Join discussionMay 16, 2025 · 8 min read · Problem Link LeetCode Version Let’s be honest—“Best Time to Buy and Sell Stock” sounds like something you’d Google after watching The Wolf of Wall Street at 2 a.m. and convincing yourself you’re a financial genius. The good news? There’s a greedy a...
Join discussion
Aug 27, 2024 · 7 min read · In the previous blog, I mentioned I would create a separate blog on the Greedy Algorithm, and here it is. This is the blog! Let's get started! What is Greedy Algorithm? Imagine a pile of both good bricks and broken pieces. Now, you are told to build ...
Join discussion
Jul 10, 2024 · 1 min read · You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position. Return true if you can reach the last index, or false otherwise. Example...
Join discussionJul 8, 2024 · 1 min read · // Input list of process execution times const input = [4, 3, 7, 1, 2]; // Function to calculate the average waiting time using SJF function averageWaitingTimeSJF(processTimes) { // Sort the process times in ascending order const sortedTimes...
Join discussion