Gulshan Kumarperfinsights.hashnode.dev·Mar 12, 2024Minimum Common ValueGiven two integer arrays nums1 and nums2, sorted in non-decreasing order, return the minimum integer common to both arrays. If there is no common integer amongst nums1 and nums2, return -1. Note that an integer is said to be common to nums1 and nums2...DiscussJava SolutionJava
Jessie Yujessieyu1.hashnode.dev·Mar 10, 2024Leetcode 142. Linked List Cycle IIGiven the head of a linked list, return the node where the cycle begins. If there is no cycle, return null. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Inte...DiscussLeetcodeleetcode
Denis Kinyuadeniskinyua.hashnode.dev·Dec 8, 2023Internal Implementation of HashSet in JavaIn the previous article, we learned what a HashSet is and its different methods. In this article, we are going to learn about the internal implementations of a HashSet in Java. In order to learn any implementation in Java, it is essential to go throu...Discuss·26 readsdata structures in java
Heera Jatheerajat.hashnode.dev·Oct 3, 2023What is diffrence between HashSet and HashMap in java? Answer it with relevent code example.HashSet and HashMap are both data structures used in Java for storing and managing collections of elements, but they serve different purposes and have different characteristics: HashSet: HashSet is a collection that stores unique elements. It does ...Discuss·3 likeshashmap
Eyuel Dan⭐⭐⭐blog.eyucoder.com·Mar 13, 2023Product of Array Except Self - LeetCode ProblemProblem Description The "Product of Array Except Self" problem statement is as follows: Given an array of integers, return an array where each element is the product of all the elements in the original array except for the one at its index. Solution ...Discuss·74 readsleetcode
Eyuel Dan⭐⭐⭐blog.eyucoder.com·Mar 13, 2023Valid Anagram - LeetCode ProblemProblem Description The "Valid Anagram" problem is given two strings s and t, write a function to determine if t is an anagram of s. An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all t...Discussarray
Anup Vishwakarmaanupv.hashnode.dev·Dec 30, 2022HashSet in javaIn Java, a HashSet is a collection that stores elements in a hash table. It is implemented using a hash table and provides fast lookups and insertion, making it a good choice for storing large amounts of data when the order of the elements is not imp...Discuss·2 likes·51 readsJava
Geilton Xaviergeiltonxavier.hashnode.dev·Dec 4, 2022Foreach vs LINQ vs HashSetIt is difficult to say definitively which of these methods is faster, as the performance of different algorithms can vary depending on the specific input data and the implementation details. In general, however, HashSet may be the fastest of these th...Discuss·820 readshashset