摘要: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is a 阅读全文
posted @ 2016-04-16 23:21 周洋 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 就是简单的应用多数投票算法(Boyer–Moore majority vote algorithm),参见这道题的题解。 阅读全文
posted @ 2016-04-16 22:23 周洋 阅读(787) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that 阅读全文
posted @ 2016-04-16 22:14 周洋 阅读(1089) 评论(0) 推荐(0) 编辑
摘要: Model.save(force_insert=False, force_update=False, using=DEFAULT_DB_ALIAS, update_fields=None) id和pk 如果一个model里没有显示声明哪一个字段(field)是主键(即在某个字段里声明primary_ 阅读全文
posted @ 2016-04-16 01:35 周洋 阅读(36674) 评论(0) 推荐(3) 编辑