Skip to content

Commit 0a47ffe

Browse files
committed
tidy code
1 parent 3d575f7 commit 0a47ffe

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

Python_stdin_data_structures/list/code_test.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44
"""
55
列表操作及性能测试
66
"""
7-
import pathlib
8-
import sys
7+
98
import timeit
109

11-
util_p = pathlib.Path('../..').resolve()
12-
sys.path.append(str(util_p))
1310
from util import utils
1411

1512

Queue/hot_potato/hot_potato.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
# Created by imoyao at 2019/6/10 18:34
4-
import pathlib
5-
import sys
64

7-
util_p = pathlib.Path('../').resolve()
8-
sys.path.append(str(util_p))
9-
from queue import Queue
105

6+
from Queue.queue import Queue
117

12-
def hot_potato(name_lists, num): # TODO:待验证
8+
9+
def hot_potato(name_lists, num): # TODO:待验证
1310
"""
1411
假设拿着土豆的孩子位于队首,当开始传递土豆时,模拟器会将那个孩子从队首移出队列然后立即让他从队尾进入队列。所有在他前面的人都
1512
轮过一遍后才会再次轮到他传土豆。每经过'num'次出队入队的过程后,站在队首的孩子就会永久离开队列,游戏将在新的圆圈中继续进行。

0 commit comments

Comments
 (0)