## LeetCode-149. Maximum number of points on a line

Topic source 149. Maximum number of points on a line Title details Give you an array of points, where points[i] = [xi, yi] represents a point on the X-Y plane. Find the maximum number of points on the same line. Example 1: Input: points = [[1,1],[2,2],[3,3]] Output: 3 Example 2: Input: points = [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]] Output: 4 ...

Added by gavin1996 on Sun, 06 Mar 2022 04:54:42 +0200

## 2022-03-05 application of symbol table (blacklist, whitelist, CSV file, construction of symbol table, construction of query index symbol table, construction of file query index symbol table)

Symbol table Symbol table is set and map. In c + +, there are map and set based on red black tree and unordered based on hash function_ map，unordered_set. The symbol table used in this code is my own implementation, according to the implementation method of algorithm 4. Blacklist The blacklist is to filter out what is on the list and ...

Added by jofield on Sat, 05 Mar 2022 09:54:29 +0200

## Simple solution of HashMap source code

jdk1.7 -: it is composed of array + linked list. The array is the main body. The linked list mainly exists to solve hash conflicts (i.e. the array index values calculated through the key are the same) (the "zipper method" solves conflicts). jdk1.8 +: it is composed of array + linked list + red black tree. There are great changes in r ...

Added by simpjd on Thu, 24 Feb 2022 04:51:51 +0200

## [Kaka on Java] in depth analysis of HashMap source code [key]

students, today we will deeply analyze the source code of HashMap. I believe many students will be asked about the source code during the interview. Which one is the most asked? Most students will definitely think of HashMap. Through the study of this article, you will be able to easily master the source code knowledge of HashMa ...

Added by KindredHyperion on Wed, 23 Feb 2022 10:33:19 +0200

## The most elegant way to write values in a Map that increase, decrease, or recalculate

The most elegant way to write a value in a Map that increases or decreases automatically or re operates a value without calling get() and put() I believe you can always meet such needs in the process of development: query a key value in the Map, add one if there is one, and put the new key value as 1 if there is no one (or perform other operat ...

Added by Ward on Sat, 19 Feb 2022 02:50:01 +0200

## HashMap source code put() method

preface As for thread safety, the put method can expose the problem of thread safety. When two different hashcode s get the same index through hash calculation, they should form a linked list. However, if multiple threads are placed in the same index, it may be overwritten, which is when judging whether the table[index] is empty. No more nons ...

Added by fastfingertips on Sat, 19 Feb 2022 01:27:26 +0200

## HashSet source code analysis, based on jdk1 8 detailed analysis

Before reading this article, it is recommended to read the blogger's article on HashMap: HashMap source code analysis + interview questions HashSet source code analysis 1, Basic introduction The underlying implementation is based on HashMap, so it is not guaranteed to iterate according to the insertion order or other order The time-con ...

Added by finkrattaz on Fri, 18 Feb 2022 21:28:44 +0200

## Detailed explanation of HashMap source code

summary HashMap allows null keys and values. Hashtable does not allow null values or null keys. NullPointerException will be thrown. The time complexity of get put is constant. HashMap has two parameters that affect its performance: initial capacity, initial capacity and load factor. Capacity refers to the number of bucket s, that is, the l ...

Added by svan_rv on Fri, 18 Feb 2022 03:23:56 +0200

## Principle analysis of HashMap and currentHashMap

Learning points of Java and big data development (under continuous update...) Reference from HashMap? ConcurrentHashMap? I believe no one can stop you after reading this article! 1, Foreword Key and value such as Map are very classic structures in software development. They are often used to store data in memory. This article mainl ...

Added by jmaccs64 on Thu, 17 Feb 2022 16:57:12 +0200

## HashMap underlying principle and jdk1 8 source code interpretation [spitting blood and sorting out 1.3w long text]

1, Foreword Write in front: it took a day to sort out the data collected by small codewords. It's helpful for you. One key three times in a row. Ha, thank you!! HashMap is often encountered in our daily development. The source code and underlying principle of HashMap must be asked in the interview. Therefore, we should master it, which is ...

Added by vweston on Thu, 17 Feb 2022 16:03:07 +0200