repo.or.cz
/
sympyx.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ok
[sympyx.git]
/
t.py
blob
2ecc628bcf998cbb2b01633c7e86028d7d749fb1
1
#! /usr/bin/env python
2
3
from
csympy
import
int_hash
,
str_hash
,
HashTable
,
Table
4
5
print
int_hash
(
5
)
6
print
int_hash
(
6
)
7
print
int_hash
(
0
)
8
print
int_hash
(
1
)
9
print
int_hash
(-
1
)
10
11
print
12
13
print
str_hash
(
"ano"
)
14
print
str_hash
(
"ne"
)
15
print
str_hash
(
"n"
)
16
17
print
"hash"
18
h
=
HashTable
()
19
h
.
insert
(
1
,
2
)
20
h
.
insert
(
3
,
5
)
21
h
.
insert
(
2
,
"ano"
)
22
print
h
.
list
()
23
24
print
"hash"
25
h
=
HashTable
()
26
h
.
insert
(
3
,
5
)
27
h
.
insert
(
2
,
"ano"
)
28
h
.
insert
(
1
,
2
)
29
print
h
.
list
()