码迷,mamicode.com
首页 >  
搜索关键字:python list    ( 182949个结果
[leetcode]Symmetric Tree @ Python
原题地址:https://oj.leetcode.com/problems/symmetric-tree/题意:判断二叉树是否为对称的。Given a binary tree, check whether it is a mirror of itself (ie, symmetric around ...
分类:编程语言   时间:2014-05-26 10:18:52    阅读次数:293
[leetcode]N-Queens @ Python
原题地址:https://oj.leetcode.com/problems/n-queens/题意:经典的N皇后问题。解题思路:这类型问题统称为递归回溯问题,也可以叫做对决策树的深度优先搜索(dfs)。N皇后问题有个技巧的关键在于棋盘的表示方法,这里使用一个数组就可以表达了。比如board=[1, ...
分类:编程语言   时间:2014-05-26 10:07:52    阅读次数:274
[LeetCode] [Partition List 2012-04-30]
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the o...
分类:其他好文   时间:2014-05-26 09:35:28    阅读次数:266
49. 3种方法实现复杂链表的复制[clone of complex linked list]
clone of complex linked list.
分类:其他好文   时间:2014-05-26 09:34:02    阅读次数:264
java 集合类
集合类说明及区别Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└SetMap├Hashtable├HashMap└WeakHashMapCollection接口 Collection是最基本的集合接口,一个Collection代表一组O....
分类:编程语言   时间:2014-05-26 09:32:53    阅读次数:258
python 的var_dump
from __future__ import print_functionfrom types import NoneType__author__ = "Shamim Hasnath"__copyright__ = "Copyright 2013, Shamim Hasnath"__license_...
分类:编程语言   时间:2014-05-26 09:29:50    阅读次数:495
Python基本语法
Python标识符在Python中,标识符有字母数字和下划线组成.在Python中,标识符可以包括英文数字以及下划线但是不能以数字开头.Python中,标识符是区分大小写的.以下划线开头的标识符是由特殊含义的.比如_foo代表不能直接访问的类属性,需通过类提供的接口进行访问,不能用"from XXX...
分类:编程语言   时间:2014-05-26 09:11:50    阅读次数:319
LeetCode:Remove Nth Node From End of List
Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After rem...
分类:其他好文   时间:2014-05-26 09:08:23    阅读次数:262
iOS学习之 plist文件的读写
在做iOS开发时,经常用到到plist文件, 那plist文件是什么呢? 它全名是:Property List,属性列表文件,它是一种用来存储串行化后的对象的文件。属性列表文件的扩展名为.plist,因此通常被称为plist文件。文件是xml格式的。Plist文件通常用于储存用户设置,也可以用于存储...
分类:移动开发   时间:2014-05-26 08:48:07    阅读次数:253
python日志功能实现-自动获取程序运行时信息
通过python的inspect模块,我们可以获取程序的运行时栈。一个python的运行时栈是一个六元组:(frame对象,文件名,当前行号,函数名,保存相关源代码行的列表,当前行在源代码列表中的位置)。栈中第一个元素代表当前执行的位置信息,最后一个表示最外层的执行信息。如: 1 import in...
分类:编程语言   时间:2014-05-26 08:26:29    阅读次数:275
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!