Array, is an non-primitive data type that helps to store the collection of multiple items. It starts from the zeroth index, store different types of data, and can be resizable. If index starts from negative number so array will be shown in reverse or...
আমরা যারা জাভাস্ক্রিপ্ট নিয়ে কাজ করি তারা কম বেশি সবাই Array.filter() মেথডের ব্যবহার সম্পর্কে জানি। কিন্তু এই পুরো মেথডটি কিভাবে কাজ করে তা হয়তো সবার জানা নেই বা সবাই জানতে ও চায় না । আমার ও একটা সময় এইটা নিয়ে কোনো চিন্তা বা মাথা ব্যথা কিছুই ছিলো না ...
Hey there! 👋 So, I've been diving into Data Structures and Algorithms (DSA) lately, and I thought I'd share some insights as I go. Let's talk about arrays—those neat little containers that store elements in a sequence. They're like the shelves in yo...
Ever wondered how to wrangle data like a pro in JavaScript? Arrays are your go-to tool for organizing and manipulating collections of data, but they can feel overwhelming at first. In this post, we’ll dive into the world of JavaScript arrays, explori...
Introduction: Today, we're tackling "Rotate Array" (LeetCode #189), a classic problem that's a brilliant example of in-place array manipulation. We're tasked with rotating an array to the right by k steps. While there are several ways to approach thi...
We're navigating a scenario that beautifully combines sorting with a clever greedy two-pointer strategy: "Boats to Save People" (LeetCode #881). This problem challenges us to minimize the number of boats used to rescue people with varying weights, gi...
📌 Problem Statement Given two strings s and t, return true if t is an anagram of s, and false otherwise. 🧠 What is an Anagram? An anagram is a word or phrase formed by rearranging the letters of another.For example: "anagram" and "nagaram" are a...
Whenever we read a blog or watch a video about data structures—especially arrays—we often come across the phrase "arrays are contiguous blocks of memory" followed by a couple of basic examples. And that's usually where it ends. But have you ever wond...
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 ...
Introduction: Welcome back to my "Mastering DSA with LeetCode" series! Today, we're tackling one of the most famous and fundamental interview questions out there: "Two Sum" (LeetCode #1). If you're starting your DSA journey, this problem is a must-so...