Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
home_work
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
牛家玺
home_work
Commits
b39ee352
Commit
b39ee352
authored
Jan 22, 2019
by
牛家玺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ok
parent
ffd65ffa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
25 deletions
+3
-25
hw1/Quicksort.py
+0
-21
hw1/Zconvert.py
+3
-4
No files found.
hw1/Quicksort.py
deleted
100644 → 0
View file @
ffd65ffa
# def quicksort1(array):
# doquicksort1(array, 0, len(array)-1)
#
#
# def doquicksort1(array, low, height):
# if low < height:
# mid = (low + height) // 2
# partition1(mid, array)
# doquicksort1(array, low, mid - 1)
# doquicksort1(array, mid + 1, height)
#
#
# def partition1(mid, array):
#
#
# def quicksort2(array):
# print(array)
#
#
# quicksort1([1, 5, 7, 8, 2, 34, 6, 0, 3])
# quicksort2([1, 5, 7, 8, 2, 34, 6, 0, 3])
hw1/Zconvert.py
View file @
b39ee352
def
convert
(
s
,
numRows
):
# 初始化数组
if
numRows
!
=
1
:
if
numRows
=
=
1
:
return
s
rows
=
[
''
]
*
numRows
index
=
0
...
...
@@ -23,9 +23,8 @@ def convert(s, numRows):
#
# str = "0123456789"
#
str = "LEETCODEISHIRING"
str
=
"LEETCODEISHIRING"
#
# convert(str, 3)
# convert(str, 4)
str
=
"AB"
print
(
convert
(
str
,
1
))
print
(
convert
(
str
,
4
))
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