朝花夕拾

Clicks&Changes

导航

2015年10月2日 #

Majority Element II

摘要: Given an integer array of sizen, find all elements that appear more than⌊ n/3 ⌋times. The algorithm should run in linear time and in O(1) space.方法很笨,其... 阅读全文

posted @ 2015-10-02 22:06 Draug 阅读(147) 评论(0) 推荐(0) 编辑

LeetCode-Pascal's Triangle

摘要: 菜鸟刷的第一题LeetCode,毫无任何优化,虽然是一道easy的题目,看到Accepted心里还是甚是欣慰的。 1 import java.util.ArrayList; 2 import java.util.List; 3 import java.util.Scanner; 4 public c... 阅读全文

posted @ 2015-10-02 21:27 Draug 阅读(137) 评论(0) 推荐(0) 编辑