• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ArgenBarbie
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页
2016年5月4日
from __future__ import absolute_import
摘要: from __future__ import absolute_import 这样以后:局部的包将不能覆盖全局的包, 本地的包必须使用相对引用了。 例: from celery import Celery 表示引用的全局的 from proj.celery import app 表示引用局部的 阅读全文
posted @ 2016-05-04 10:00 ArgenBarbie 阅读(154) 评论(0) 推荐(0)
2016年5月3日
python 参数 *
摘要: 函数声明的时候参数前面加*说明接受不限数量的无名参数。在函数体内这个参数实际上是一个列表,包含固定参数外的所有无名参数。 不定的有名参数可以用**来声明,在函数体内是一个字典。 阅读全文
posted @ 2016-05-03 14:21 ArgenBarbie 阅读(174) 评论(0) 推荐(0)
2016年5月1日
118. 119. Pascal's Triangle -- 杨辉三角形
摘要: 118. Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return 119. Given an index k, return the kth row o 阅读全文
posted @ 2016-05-01 10:54 ArgenBarbie 阅读(233) 评论(0) 推荐(0)
2016年4月30日
115. Distinct Subsequences *HARD* -- 字符串不连续匹配
摘要: Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from t 阅读全文
posted @ 2016-04-30 12:43 ArgenBarbie 阅读(198) 评论(0) 推荐(0)
2016年4月28日
html中用变量作为django字典的键值
摘要: 若字典为dic={'name': Barbie, 'age': 20},则在html中dic.name为Barbie,dic.age为20。 但若字典为dic={'Barbie': 1, 'Roger': 2, 'Kitty': 3},要在html中用变量name表示名字,则不能直接用dic.nam 阅读全文
posted @ 2016-04-28 23:55 ArgenBarbie 阅读(2179) 评论(0) 推荐(0)
2016年4月21日
331. Verify Preorder Serialization of a Binary Tree -- 判断是否为合法的先序序列
摘要: One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, 阅读全文
posted @ 2016-04-21 19:20 ArgenBarbie 阅读(257) 评论(0) 推荐(0)
310. Minimum Height Trees -- 找出无向图中以哪些节点为根,树的深度最小
摘要: For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible roote 阅读全文
posted @ 2016-04-21 19:04 ArgenBarbie 阅读(405) 评论(0) 推荐(0)
297. Serialize and Deserialize Binary Tree *HARD*
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2016-04-21 17:41 ArgenBarbie 阅读(204) 评论(0) 推荐(0)
235.236. Lowest Common Ancestor of a Binary (Search) Tree -- 最近公共祖先
摘要: 235. Lowest Common Ancestor of a Binary Search Tree Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the 阅读全文
posted @ 2016-04-21 16:04 ArgenBarbie 阅读(200) 评论(0) 推荐(0)
222. Count Complete Tree Nodes -- 求完全二叉树节点个数
摘要: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, ex 阅读全文
posted @ 2016-04-21 15:30 ArgenBarbie 阅读(157) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3