What is time complexity ? Time complexity is time taken by the code or algorithm to execute the program. Time complexity depends on the size of the input. There are three notations in time complexity : Best Case ( Ω )Average Case ( Θ )Worst Case ( O ...
Problem Statement:You are given an array: arr = {10, 20, 30, 40, 50}; And the following queries: Add 5 to every element in the interval [1, 3] Add 10 to every element in the interval [2, 4] What should the final array look like after all these ...
"Bro, why are we even learning sorting when we have sort()?"— Me, a few months ago Hey everyone! 👋 I'm Ritam (or just a random 19-year-old trying to survive C++), and today we’re talking about something that sounds boring but is actually weirdly sa...
Introduction: Welcome to Day 9 of my 90 Days DSA Challenge! Today, I focused on refining recursive logic and enhancing validation techniques. I tackled two essential binary tree problems using recursion and revisited the classic Valid Sudoku problem....
🔥 Introduction: Welcome back to Day 8 of my 90 Days DSA Challenge!Today, I dove deep into the recursive world of binary trees, where every call is a path and every return is a revelation. We explored three essential problems that form the foundation...
Welcome back, tech enthusiasts! On Day 7 of the 90 Days DSA Challenge, I explored a mix of Binary Tree Traversals and a String pattern search problem, and revised two previously covered Linked List problems. This blend of problems gave me a chance to...
The Science Behind Your Daily Navigation Whether you're hurrying to the office, organizing a road trip, or discovering a new city, Google Maps has turned into an everyday guide for our lives. But have you ever stopped and wondered how this smart syst...
Anagrams are words formed by rearranging the letters of another word, like "eat", "tea", and "ate". Grouping anagrams efficiently is a common coding challenge in interviews and competitive programming. In this article, we’ll explore two approaches: ...
Hey everyone! Welcome to day 8 of my 100 days of DSA challenge. Today I’ll be solving 5 problems related to stacks. The code for each problem along with the output is given below. Stacks are very useful data structure which can help us solve many pro...
What is DSA? A Beginner's Guide DSA stands for Data Structures and Algorithms. It's a fundamental concept in computer science that forms the backbone of efficient problem-solving and software development. Understanding the Basics Data Structures: Th...