Sliding Window and Two Pointer Technique

Sliding Window and Two Pointer Technique (Photo Credit: Google Image) Story There is a school called ABC School, which frequently arranges extracurricular activities like games, dancing competitions, art competitions, etc. for their students. Today it arranged 2 interesting games called sliding window and rope pulling. The rules for the sliding window game are: first, make 2 teams; second, each team takes their position, and then, based on some condition, they slide their window 1 or more units until the window reaches the end position. ...

September 1, 2025 Â· 5 min Â· Saiful Islam Rasel

Searching Algorithm (Linear Search and Binary Search)

Linear and Binary Search (Photo Credit: Crio.Do) Story Let’s say students of the CSE department of University XYZ are going on a study tour in a tourist place. They are staying in a hotel, and surprisingly, they booked rooms on different floors, not the same, with one student per floor. And students get their room according to their rank/roll. This means students with the highest rank are staying on the topmost floor, and those with the lowest are staying on the lower floor. So the 1st rank lives at the top, and the last rank lives in the low, let’s say the 1st floor. ...

August 31, 2025 Â· 4 min Â· Saiful Islam Rasel

Book Review and Takeaways: (Refactoring - Improving the Design of Existing Code)

Detailed Refactoring Series: Part 1: Refactoring - Part 1 (Principle, What It Is & Is Not, Identify the Smells First) Refactoring Book Book introduction Martin Fowler’s “Refactoring: Improving the Design of Existing Code” is a classic book that teaches developers how to improve the structure of existing code without changing what it does. Refactoring makes code easier to read, maintain and expand, helping teams write better software over time. ...

August 29, 2025 Â· 3 min Â· Saiful Islam Rasel

Refactoring - Part 2 (Techniques for Cleaning Up the Smells)

Other Parts of This Series: Part 1: Refactoring - Part 1 (Principle, What It Is & Is Not, Identify the Smells First) Refactoring Techniques In our previous part, we talked about what is refactoring and what is not, the motivation behind this, and identifying the common code smells we generally found in our codebase. In this part we are going to explore some well-known techniques that can help us to clean up the code smells. So let’s start… ...

August 28, 2025 Â· 8 min Â· Saiful Islam Rasel

Refactoring - Part 1 (Principle, What It Is & Is Not, Identify the Smells First)

Other Parts of This Series: Part 2: Refactoring - Part 2 (Techniques for Cleaning Up the Smells) Refactoring Principles Main Principle of Refactoring The main motivation of refactoring is the Boy Scout rule, which is “Keep the camp ground cleaner than you found it.” In our words, “Keep the codebase cleaner and more readable than you found it.” Definition Refactoring is the process of restructuring existing code to improve its quality (like readability or performance) without altering its external or existing behavior. ...

August 27, 2025 Â· 5 min Â· Saiful Islam Rasel

We use cookies and technologies like Google Analytics and Microsoft Clarity to understand how users interact with our site and improve your experience.