PBProgramming Blogsinworldofprogramming.hashnode.dev·5d ago · 12 min readBottom-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] সরাসরি loo00
PBProgramming Blogsinworldofprogramming.hashnode.dev·May 25 · 5 min readচিন্তা করার আনন্দআমরা ছোটবেলা থেকেই অনেক কিছু শিখি। কেউ আমাদের অংক শেখায়, কেউ ভাষা শেখায়, কেউ ইতিহাস শেখায়। কিন্তু খুব কম মানুষই আমাদের শেখায়, কীভাবে চিন্তা করতে হয়। চিন্তা করা শুনতে খুব সাধারণ একটা কাজ মনে হয়। আমরা ত00
PBProgramming Blogsinworldofprogramming.hashnode.dev·Sep 27, 2025 · 2 min readFast & 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...00
PBProgramming Blogsinworldofprogramming.hashnode.dev·Sep 17, 2025 · 2 min readTwo 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...00
PBProgramming Blogsinworldofprogramming.hashnode.dev·Sep 14, 2025 · 2 min readSliding 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", "...00