上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页
摘要: 一、冒泡排序 冒泡排序动图演示 二、选择排序 动态图 三、插入排序 从第一个元素开始,该元素可以认为已经被排序; 取出下一个元素,在已经排序的元素序列中从后向前扫描; 如果该元素(已排序)大于新元素,将该元素移到下一位置; 重复步骤3,直到找到已排序的元素小于或者等于新元素的位置; 将新元素插入到该 阅读全文
posted @ 2019-04-28 23:31 米开朗菠萝 阅读(230) 评论(0) 推荐(0)
摘要: Given a linked list, swap every two adjacent nodes and return its head. Example: Note: Your algorithm should use only constant extra space. You may no 阅读全文
posted @ 2019-01-30 15:36 米开朗菠萝 阅读(125) 评论(0) 推荐(0)
摘要: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the 阅读全文
posted @ 2019-01-30 14:48 米开朗菠萝 阅读(90) 评论(0) 推荐(0)
摘要: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You may not modify the values in the list's nodes, only nodes its 阅读全文
posted @ 2019-01-30 08:40 米开朗菠萝 阅读(96) 评论(0) 推荐(0)
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: 阅读全文
posted @ 2019-01-25 11:17 米开朗菠萝 阅读(129) 评论(0) 推荐(0)
摘要: # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def partition(self, head, x):... 阅读全文
posted @ 2019-01-15 19:04 米开朗菠萝 阅读(83) 评论(0) 推荐(0)
摘要: 1.下载VMware Workstation 64版本 https://www.vmware.com/products/workstation-pro/workstation-pro-evaluation.html 2.下载CentOS-7-x86_64-DVD-1810 https://www.c 阅读全文
posted @ 2019-01-01 12:11 米开朗菠萝 阅读(237) 评论(0) 推荐(0)
摘要: #!/usr/bin/python # -*- coding: UTF-8 -*- from pythonds.basic.stack import Stack def parChecker(symbolString): s = Stack() balanced = True index = 0 w 阅读全文
posted @ 2018-12-13 23:14 米开朗菠萝 阅读(1220) 评论(0) 推荐(0)
摘要: 链接:https://docs.python.org/2/howto/logging-cookbook.html#logging-cookbook 具体的使用方法,请参考如下代码: Here is the auxiliary module: The output looks like this: 阅读全文
posted @ 2018-12-13 10:14 米开朗菠萝 阅读(1767) 评论(0) 推荐(0)
摘要: 1.安装python2 下载地址: https://www.python.org/downloads/windows/ 进入页面,下拉,64位系统要选择这个。 下载完成后,一直点击下一步,直到安装完毕。 2.配置Python2环境变量 (1) 右键点击"计算机",然后点击"属性" (2) 然后点击" 阅读全文
posted @ 2018-12-12 10:06 米开朗菠萝 阅读(3881) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页