Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1_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
安晓东
1_homework_安晓东
Commits
ec36c835
Commit
ec36c835
authored
Jan 27, 2019
by
牛家玺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ok
parent
cc315b06
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
2 deletions
+15
-2
lession_3/home_work.py
+2
-0
lession_4/homework_01.py
+3
-0
lession_5/toGoatLatin.py
+1
-0
lession_6/hemework.py
+3
-0
lession_7/homework.py
+4
-2
lession_8/Solution.py
+2
-0
No files found.
lession_3/home_work.py
View file @
ec36c835
...
...
@@ -22,6 +22,8 @@
def
uniqueMorseRepresentations
(
words
):
r
=
[
".-"
,
"-..."
,
"-.-."
,
"-.."
,
"."
,
"..-."
,
"--."
,
"...."
,
".."
,
".---"
,
"-.-"
,
".-.."
,
"--"
,
"-."
,
"---"
,
".--."
,
"--.-"
,
".-."
,
"..."
,
"-"
,
"..-"
,
"...-"
,
".--"
,
"-..-"
,
"-.--"
,
"--.."
]
# w 可以使用 {chr(i + 97): morse[i] for i in range(0, len(morse))} 来生成
w
=
[
'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'
]
dic
=
dict
(
zip
(
w
,
r
))
...
...
lession_4/homework_01.py
View file @
ec36c835
...
...
@@ -18,6 +18,9 @@ def convert(s, numRows):
s
=
convert
(
"PAYPALISHIRING"
,
4
)
print
(
s
)
s
=
convert
(
"LEETCODEISHIRING"
,
4
)
#输出结果 LDREOEIIECIHN 正确是LDREOEIIECIHNTSG 检查一下那一步少了什么操作
print
(
s
)
# def convert(s, numRows):
...
...
lession_5/toGoatLatin.py
View file @
ec36c835
...
...
@@ -13,6 +13,7 @@ def toGoatLatin(S):
print
(
toGoatLatin
(
"I speak Goat Latin"
))
#正确
...
...
lession_6/hemework.py
View file @
ec36c835
...
...
@@ -74,3 +74,6 @@ def findRadius(houses, heaters):
houses
,
heaters
=
[
1
,
3
,
5
,
9
],
[
1
,
4
]
findRadius
(
houses
,
heaters
)
houses
=
[
282475249
,
622650073
,
984943658
,
144108930
,
470211272
,
101027544
,
457850878
,
458777923
]
heaters
=
[
823564440
,
115438165
,
784484492
,
74243042
,
114807987
,
137522503
,
441282327
,
16531729
,
823378840
,
143542612
]
findRadius
(
houses
,
heaters
)
lession_7/homework.py
View file @
ec36c835
...
...
@@ -15,4 +15,6 @@ matrix = [
[
9
,
5
,
1
,
2
]
]
print
(
isToeplitzMatri
(
matrix
))
\ No newline at end of file
print
(
isToeplitzMatri
(
matrix
))
#正确
\ No newline at end of file
lession_8/Solution.py
View file @
ec36c835
...
...
@@ -12,3 +12,4 @@ class Solution:
#ok
\ No newline at end of file
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