Romman Sabbirrommansabbir.com·Jul 25, 2024Understanding ConcurrentHashMap in Kotlin/JavaIntroduction In multi-threaded programming, managing data consistency and thread safety is paramount. A common challenge is efficiently managing a shared resource without compromising on performance. In Java and Kotlin, the ConcurrentHashMap is a key...Discuss·38 readsKotlinconcurrenthashmap
Riyaz Nabiyullariyaz-blog.hashnode.dev·Jul 15, 2024Data Structures - Java: Syntax, Use Case, Time and Space Complexity1. Arrays Syntax: // Declaration and initialization int[] array = new int[10]; int[] array = {1, 2, 3, 4, 5}; // Accessing elements int element = array[0]; // Modifying elements array[1] = 10; Use Cases: Fixed-size collections, fast access by inde...DiscussDSA-Javadata structures
Akshaya Biswalakshaya-biswal.hashnode.dev·Jul 7, 2024Hash TableA hash table (or hash map) is a data structure that implements an associative array, a structure that can map keys to values. It uses a hash function to compute an index. Operations OperationAverage Time ComplexityWorst-Case Time ComplexitySpa...DiscussData StructureProgramming Blogs
Thunderthunderbyte.hashnode.dev·Jun 27, 202415.Java HashMap 다시 복습알고리즘 문제를 풀다가 기초 문법이 부실하다는 생각이 들었다.이론으로 알고있는 것과 손가락으로 두들겨본 코드는 다르니.. 그래서 복습을 진행했다. 1. 그룹화 애너그램 그룹화: 문자열 배열 strs가 주어졌을 때, 애너그램(문자를 재배열하여 다른 단어를 만들 수 있는 단어)끼리 그룹화하는 프로그램을 작성하세요.HashMap을 사용하여 애너그램 그룹을 관리하고, 결과를 출력하세요. import java.util.ArrayList; import...DiscussJavaJava
Vineeth Chivukulavineethchivukula.hashnode.dev·Jun 24, 2024Understanding Java HashMap for DSAA HashMap in Java is a part of the Java Collections Framework and provides a way to store key-value pairs, where keys are unique. It is part of the java.util package and implements the Map interface. The HashMap class allows null values and the null ...Discusshashmap
Sahil Jagtapsahiljagtap.hashnode.dev·Jun 18, 2024Dealing with Array & Hashing Problems: Essential Tips and Tricks: Part 1In this article, we will explore arrays and hashing problems with the top 5 famous challenges. If you've ever been frustrated by dynamic arrays or hashing problems on platforms like LeetCode, don't worry! After reading this article, you'll master the...Discuss·1 likeAlgorithms Series by Sahilarrays
Nawat Sunthornyanakitearthcode.hashnode.dev·Jun 14, 2024Valid Anagram (Leetcode #242)Question: Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Exam...DiscussPython
Nawat Sunthornyanakitearthcode.hashnode.dev·Jun 13, 2024Two Sum (Leetcode #1)Question: Given an array of integers nums and an integer target, return the indices of the two numbers such that they add up to the target. Constraints: Each input would have exactly one solution. The same element cannot be used twice. Examples: ...Discussleetcode
Chetan Dattachetan77.hashnode.dev·Jun 11, 202421 Java - MapMap Its an interface and its implementations are HashMap: Do not maintains the order. HashTable: Synchronized version of HashMap LinkedHashMap: Maintains the insertion order. TreeMap: sorts the data internally. Object that maps key to values....DiscussJavaLinkedHashMap
Gulshan Kumarperfinsights.hashnode.dev·Jun 9, 2024Replace WordsIn English, we have a concept called root, which can be followed by some other word to form another longer word - let's call this word derivative. For example, when the root "help" is followed by the word "ful", we can form a derivative "helpful". Gi...DiscussJava SolutionJava