Commit 3b66662d by 牛家玺

批改

parent 5ba32960
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
def word2moersi(m): def word2moersi(m):
alpha = [".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--", "-.", "---", 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", 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"] "v", "w", "x", "y", "z"]
#建立两者间的映射关系 #建立两者间的映射关系
......
...@@ -28,3 +28,5 @@ def quick_sort(sort_list,start,end): ...@@ -28,3 +28,5 @@ def quick_sort(sort_list,start,end):
l = [8,6,99,44,2,3,5,7,44,77,9] l = [8,6,99,44,2,3,5,7,44,77,9]
print(quick_sort(l,0,len(l)-1)) print(quick_sort(l,0,len(l)-1))
print(q_sort(l)) print(q_sort(l))
#ok
...@@ -39,3 +39,5 @@ str = "The quick brown fox jumped over the lazy dog" ...@@ -39,3 +39,5 @@ str = "The quick brown fox jumped over the lazy dog"
l = Latin() l = Latin()
c = l.coat_latin(str) c = l.coat_latin(str)
print(c) print(c)
#ok
\ No newline at end of file
...@@ -52,4 +52,6 @@ utils = SortUtils() ...@@ -52,4 +52,6 @@ utils = SortUtils()
#r = utils.sort(str,'bubble') #r = utils.sort(str,'bubble')
s = utils.sort(str,'quick') s = utils.sort(str,'quick')
#print(r) #print(r)
print(s) print(s)
\ No newline at end of file
#ok
\ No newline at end of file
...@@ -30,4 +30,6 @@ house = [1,2,3,4] ...@@ -30,4 +30,6 @@ house = [1,2,3,4]
heater = [1,4] heater = [1,4]
h = Heater() h = Heater()
s = h.findRadius(house,heater) s = h.findRadius(house,heater)
print(s) print(s)
\ No newline at end of file
#ok
\ No newline at end of file
...@@ -26,4 +26,4 @@ class Solution: ...@@ -26,4 +26,4 @@ class Solution:
matrix = [[1,2,3,4], [5,1,2,3], [9,5,1,2]] matrix = [[1,2,3,4], [5,1,2,3], [9,5,1,2]]
solu = Solution() solu = Solution()
solu.isToeplitzMatrix(matrix) print(solu.isToeplitzMatrix(matrix))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment