The Linked List

Introduction A linked list is a fundamental data structure which consists of Nodes that are connected to each other. Other variations are: Double linked list Circular linked list (circular buffer) The Singly Linked List To visualize the data structure, if you want to store two integers 10 and 20 you will have a 2 node linked list that will have: [Node 1, Value 10] -> [Node 2, Value: 20] -> [null]...

April 17, 2024 · 5 min · Denis Nutiu

Overflowing Buckets

Hello everyone 👋, Today I want to share with you a problem I’ve encountered along my journey. The problem is fairly simple: You have a finite number of water units. You have a finite number of buckets. You need to distribute the water units into the buckets. Each bucket has a maximum capacity. When a bucket is full, the water overflows into the next two buckets by splitting evenly. You need to print the number of the buckets that are full....

June 15, 2023 · 3 min · Denis Nutiu