Retranslate the complete English edition from Simplified Chinese (#2010)

* Retranslate the complete English edition from Simplified Chinese

* Polish three English explanations after reader-focused review
This commit is contained in:
Yudong Jin
2026-10-31 03:35:51 +08:00
committed by GitHub
parent ef46e2ed95
commit 14c314c08c
1502 changed files with 29459 additions and 23517 deletions

View File

@@ -10,28 +10,28 @@ from pathlib import Path
sys.path.append(str(Path(__file__).parent.parent))
from modules import ListNode
"""Driver Code"""
"""Driver code"""
if __name__ == "__main__":
num = 3
hash_num = hash(num)
print(f"Hash value of integer {num} is {hash_num}")
print(f"Hash value of integer {num}: {hash_num}")
bol = True
hash_bol = hash(bol)
print(f"Hash value of boolean {bol} is {hash_bol}")
print(f"Hash value of Boolean {bol}: {hash_bol}")
dec = 3.14159
hash_dec = hash(dec)
print(f"Hash value of decimal {dec} is {hash_dec}")
print(f"Hash value of floating-point number {dec}: {hash_dec}")
str = "Hello algo"
str = "Hello 算法"
hash_str = hash(str)
print(f"Hash value of string {str} is {hash_str}")
print(f"Hash value of string {str}: {hash_str}")
tup = (12836, "Xiao Ha")
tup = (12836, "小哈")
hash_tup = hash(tup)
print(f"Hash value of tuple {tup} is {hash(hash_tup)}")
print(f"Hash of the hash value of tuple {tup}: {hash(hash_tup)}")
obj = ListNode(0)
hash_obj = hash(obj)
print(f"Hash value of node object {obj} is {hash_obj}")
print(f"Hash value of node object {obj}: {hash_obj}")