Bottom-up Iterative Segment Treeধরা যাক, আমাদের একটি array আছে: a = [5, 2, 7, 3, 6, 1, 4, 8] আমাদের দুই ধরনের operation করতে হবে: একটি position-এর value update করা। কোনো range-এর sum বের করা। উদাহরণ: sum of a[2...6] সরাসরি looJun 21 · 12 min readworldofprogramming.hashnode.dev
চিন্তা করার আনন্দআমরা ছোটবেলা থেকেই অনেক কিছু শিখি। কেউ আমাদের অংক শেখায়, কেউ ভাষা শেখায়, কেউ ইতিহাস শেখায়। কিন্তু খুব কম মানুষই আমাদের শেখায়, কীভাবে চিন্তা করতে হয়। চিন্তা করা শুনতে খুব সাধারণ একটা কাজ মনে হয়। আমরা তMay 25 · 5 min readworldofprogramming.hashnode.dev
Fast & Slow PointersThe Fast & Slow Pointers (also called the tortoise and hare algorithm) is a clever technique often used in linked list and array problems to detect cycles, find midpoints, or solve problems efficiently in linear time with constant space. Here’s the i...Sep 27, 2025 · 2 min readworldofprogramming.hashnode.dev
Two PointersTwo Pointers Definition: Use two indices to traverse an array/string, either from opposite ends (left/right) or at different speeds. Key Idea: Reduce search space or compare elements without scanning everything twice. Typical Uses: Check if array...Sep 17, 2025 · 2 min readworldofprogramming.hashnode.dev
Sliding Window (Python)Definition: A specific type of two-pointers where the pointers define a window (subarray or substring), and this window slides (expands/shrinks) to maintain some property. Common Usage: Substring or subarray problems Problems involving "longest", "...Sep 14, 2025 · 2 min readworldofprogramming.hashnode.dev