mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 14:18:20 +08:00 
			
		
		
		
	Update docs/chapter_searching/hashing_search.md
Co-authored-by: Justin Tse <xiefahit@gmail.com>
This commit is contained in:
		@ -173,10 +173,10 @@ comments: true
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    ```typescript title="hashing_search.ts"
 | 
					    ```typescript title="hashing_search.ts"
 | 
				
			||||||
    /* 哈希查找(链表) */
 | 
					    /* 哈希查找(链表) */
 | 
				
			||||||
    function hashingSearch1(map: Map<number, any>, target: number) {
 | 
					    function hashingSearch1(map: Map<number, ListNode>, target: number): ListNode | null {
 | 
				
			||||||
        // 哈希表的 key: 目标结点值,value: 结点对象
 | 
					        // 哈希表的 key: 目标结点值,value: 结点对象
 | 
				
			||||||
        // 若哈希表中无此 key ,返回 null
 | 
					        // 若哈希表中无此 key ,返回 null
 | 
				
			||||||
        return map.has(target) ? map.get(target) : null;
 | 
					        return map.has(target) ? map.get(target) as ListNode : null;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    ```
 | 
					    ```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user