Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
homework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ligang
homework
Commits
3b66662d
Commit
3b66662d
authored
Jan 27, 2019
by
牛家玺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批改
parent
5ba32960
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
1 deletions
+14
-1
03-homework-ligang/moersi.py
+2
-0
04-homework-ligang/quick_sort.py
+2
-0
05-homework-ligang/coat_latin.py
+3
-0
05-homework-ligang/sort.py
+3
-0
06-homework-ligang/heaters.py
+3
-0
07-homework-ligang/matrix.py
+1
-1
No files found.
03-homework-ligang/moersi.py
View file @
3b66662d
...
...
@@ -7,6 +7,8 @@
def
word2moersi
(
m
):
alpha
=
[
".-"
,
"-..."
,
"-.-."
,
"-.."
,
"."
,
"..-."
,
"--."
,
"...."
,
".."
,
".---"
,
"-.-"
,
".-.."
,
"--"
,
"-."
,
"---"
,
".--."
,
"--.-"
,
".-."
,
"..."
,
"-"
,
"..-"
,
"...-"
,
".--"
,
"-..-"
,
"-.--"
,
"--.."
]
# words 可以这么写morse_dict = {chr(i + 97): morse[i] for i in range(0, len(morse))}
words
=
[
"a"
,
"b"
,
"c"
,
"d"
,
"e"
,
"f"
,
"g"
,
"h"
,
"i"
,
"j"
,
"k"
,
"l"
,
"m"
,
"n"
,
"o"
,
"p"
,
"q"
,
"r"
,
"s"
,
"t"
,
"u"
,
"v"
,
"w"
,
"x"
,
"y"
,
"z"
]
#建立两者间的映射关系
...
...
04-homework-ligang/quick_sort.py
View file @
3b66662d
...
...
@@ -28,3 +28,5 @@ def quick_sort(sort_list,start,end):
l
=
[
8
,
6
,
99
,
44
,
2
,
3
,
5
,
7
,
44
,
77
,
9
]
print
(
quick_sort
(
l
,
0
,
len
(
l
)
-
1
))
print
(
q_sort
(
l
))
#ok
05-homework-ligang/coat_latin.py
View file @
3b66662d
...
...
@@ -39,3 +39,5 @@ str = "The quick brown fox jumped over the lazy dog"
l
=
Latin
()
c
=
l
.
coat_latin
(
str
)
print
(
c
)
#ok
\ No newline at end of file
05-homework-ligang/sort.py
View file @
3b66662d
...
...
@@ -53,3 +53,5 @@ utils = SortUtils()
s
=
utils
.
sort
(
str
,
'quick'
)
#print(r)
print
(
s
)
#ok
\ No newline at end of file
06-homework-ligang/heaters.py
View file @
3b66662d
...
...
@@ -31,3 +31,5 @@ heater = [1,4]
h
=
Heater
()
s
=
h
.
findRadius
(
house
,
heater
)
print
(
s
)
#ok
\ No newline at end of file
07-homework-ligang/matrix.py
View file @
3b66662d
...
...
@@ -26,4 +26,4 @@ class Solution:
matrix
=
[[
1
,
2
,
3
,
4
],
[
5
,
1
,
2
,
3
],
[
9
,
5
,
1
,
2
]]
solu
=
Solution
()
solu
.
isToeplitzMatrix
(
matrix
)
print
(
solu
.
isToeplitzMatrix
(
matrix
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment