File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
Python_stdin_data_structures/list Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 44"""
55列表操作及性能测试
66"""
7- import pathlib
8- import sys
7+
98import timeit
109
11- util_p = pathlib .Path ('../..' ).resolve ()
12- sys .path .append (str (util_p ))
1310from util import utils
1411
1512
Original file line number Diff line number Diff line change 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'次出队入队的过程后,站在队首的孩子就会永久离开队列,游戏将在新的圆圈中继续进行。
You can’t perform that action at this time.
0 commit comments