mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-29 03:17:13 +00:00
Many bug fixes and improvements (#1270)
* Add Ruby and Kotlin icons Add the avatar of @curtishd * Update README * Synchronize zh-hant and zh versions. * Translate the pythontutor blocks to traditional Chinese * Fix en/mkdocs.yml * Update the landing page of the en version. * Fix the Dockerfile * Refine the en landingpage * Fix en landing page * Reset the README.md
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
package chapter_hashing
|
||||
|
||||
const val MODULUS = 10_0000_0007
|
||||
const val MODULUS = 1000000007
|
||||
|
||||
/* 加法雜湊 */
|
||||
fun addHash(key: String): Int {
|
||||
@@ -48,7 +48,7 @@ fun rotHash(key: String): Int {
|
||||
fun main() {
|
||||
val key = "Hello 演算法"
|
||||
|
||||
var hash: Int = addHash(key)
|
||||
var hash = addHash(key)
|
||||
println("加法雜湊值為 $hash")
|
||||
|
||||
hash = mulHash(key)
|
||||
|
||||
Reference in New Issue
Block a user