台灣叫雜湊,中國那裡還直接翻成「哈希」。中文是毫無意義的翻譯,故下面我還是盡量用 Hash。Hash 的定義為: 每一次都可將輸入的數值 x 轉成一個 0..n 中的一個數字,而且(盡量)無碰撞...
我第一想說的主題是雜湊,也就是 Hash, 因為 md5 就是一種 Hash,不了解 Hash 也無從介紹起。但由於 Hash 的概念較為抽象,即使資工系大一的資料結構中已有納入 Hash,我大學時完...
哈希函數(Hash)對我而言是個熟悉卻又陌生的老朋友,因為在開發各種系統與遊戲的人生中,一直少不了它的陪伴,但始終沒有親手實作這些函數。 Hash Function的中文名字有很多個,音譯是哈希函數...
Longest Consecutive Sequence Given an unsorted array of integers nums, return the length of the long...
Encode and Decode Strings Design an algorithm to encode a list of strings to a string. The encoded s...
Product of Array Except Self Problem Description Given an integer array nums, return an array answer...
Group Anagrams Problem Description Given an array of strings strs, group the anagrams together. You...
Top K Frequent Elements Problem Description Given an integer array nums and an integer k, return the...
Valid Anagram Given two strings s and t, return true if t is an anagram of s, and false otherwise. A...
contain duplicate Problem Description Given an integer array nums, return true if any value appears ...