Category: hash
Given an array nums and a target value k, find the maximum length of a Contiguous subarray that sums to k. If there isn’t one, return 0 instead. The …
Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = , nums2 = Output: Example 2: Input: nums1 = , nums2 = Output: Note: …
Given any string (assume both lowercase or uppercase letters), check if a permutation of the string could form a palindrome. For example, canPermutePalindrome(“aab”) = true while canPermutePalindrome(“ab”) = false. …
I am recently reviewing the data structure & algorithms. And the hash table is one of the key knowledge that you can’t miss before you attend a coding interview. …
A Hash function returns a 32-bit (or sometimes 64-bit) integers for any given length of data. The function has to be as fast as possible and the collision should …