Different ways of iterating on a HashMap in Java Tech by Sunny Srinidhi - August 7, 2020August 7, 20200 HashMap is one of those data structures that we use a lot in our code, almost on a daily basis. And there will be situations where we’d want to iterate on the keys in a HashMap. There are many ways in which we can do it, and in this post, I’ll talk about five such ways. Read more... “Different ways of iterating on a HashMap in Java”
HashMap implementation in Java Tech by Sunny Srinidhi - January 3, 2020January 3, 20203 More in The Data Structures series. In our data structure series, we have already looked at a couple of ways in which we can implement a stack, and also Single Linked Lists (SLL) and Double Linked Lists (DLL). In this post, we'll see how we can implement our own HashMap and see a couple of examples of how we can use that HashMap. Let's get started. The HashMap Before we can start with the implementation of the HashMap, we need to understand how the stuff actually works. This is a combination of an array and a LinkedList. So it's a bit interesting. When we add an item to a HashMap, we provide a key and a value. The key will be used as a