Designing your own Hash Map with Positive Numbers!

In computing Hash Table or Hash Maps are amazing. For me it’s the 9th wonder of the world. Compounding is still the 8th one 😄 So let’s understand what is hashing. Hashing Hashing is the process of converting a given key into another value. A hash function is used to generate the new value according … 

 

Container with most water

Question Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of the line i is at (i, ai) and (i, 0). Find two lines, which, together with the x-axis forms a container, such that the container contains … 

 

Finding if a cycle exists in a Linked List

What is Linked List? A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers as shown in the below image: Thus, a linked list consists of nodes where each node contains a data field and a … 

 

Why Bitmaskers ?

Many of you might be wondering what is the motive behind the page name! Well, I thought why not throw some light 🔦 on this 😄 Back to Basics: Shall we ? A bit is a single Boolean value (0 or 1), small set(s) of which makes a bit-mask. A bit is said to be …