上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 33 下一页
摘要: tile()函数可以很方便的生成多维数组。它有两个参数,第一个数是原始数组;第二个表示如何来生成,第一个数字表示生成几行,第二个表示每行有多少个原始数组(如果只写一个数字,那么就默认是一行)。   阅读全文
posted @ 2016-03-14 22:54 周洋 阅读(627) 评论(0) 推荐(0) 编辑
摘要: B与bit B与bit 数据存储是以“字节”(Byte)为单位,数据传输是以大多是以“位”(bit,又名“比特”)为单位,一个位就代表一个0或1(即二进制),每8个位(bit,简写为b)组成一个字节(Byte,简写为B),是最小一级的信息单位。 B与iB B与iB 1KB(Kibibyte)=102 阅读全文
posted @ 2016-03-04 16:31 周洋 阅读(229) 评论(0) 推荐(0) 编辑
摘要: django的get()方法是从数据库的取得一个匹配的结果,返回一个对象,如果记录不存在的话,它会报错。 django的filter()方法是从数据库的取得匹配的结果,返回一个对象列表,如果记录不存在的话,它会返回[]。 阅读全文
posted @ 2016-03-02 22:52 周洋 阅读(833) 评论(0) 推荐(0) 编辑
摘要: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette 阅读全文
posted @ 2016-02-27 18:57 周洋 阅读(299) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded 阅读全文
posted @ 2016-02-27 00:23 周洋 阅读(482) 评论(0) 推荐(0) 编辑
摘要: Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn't ma 阅读全文
posted @ 2016-02-26 23:02 周洋 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree {3 阅读全文
posted @ 2016-02-26 17:59 周洋 阅读(262) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2016-02-26 16:58 周洋 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2016-02-26 09:51 周洋 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the dept 阅读全文
posted @ 2016-02-26 09:42 周洋 阅读(170) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 33 下一页