When do we need the template design pattern? The template design pattern is useful when different components share some functionality and adding a change to one would need duplicate changes in the other component. How do we implement the template design pattern? The template design pattern is a...

Introduction: Binary search is one of the most important algorithms for competitive programming. You may find other uses of binary search too, these are just a few topics mentioned that use binary search heavily: 1. Array problems 2. Geometry problems Let me give you a real-life example, imagine you...

Java generics is a powerful feature introduced in JDK 5.0 that was directed towards improving the quality of code through abstraction. It aims to improve code reusability by providing a mechanism to write classes and functions in such a way that types can be passed...

The decorator design pattern is a structural design pattern that is used for extending the functionality of existing classes without much of a change in the codebase. You can also look at this design pattern as a wrapper around the existing functionality. Let’s dive into the...

Consistent Hashing is a distributed hashing technique that is loosely coupled with the number of servers or objects in a distributed hash table by positioning them in an abstract circle, or hash ring. This allows servers and objects to scale without affecting the overall system....

Today’s technical architecture is inclined towards the distributed system because of the ease of scalability it provides. This scenario demands that we understand the trade-offs made in a distributed architecture, which brings us to the CAP theorem. Let’s begin right away but putting on our...