2015年3月30日

Find Peak Element

摘要: A peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and return its index.... 阅读全文

posted @ 2015-03-30 15:21 Step-BY-Step 阅读(158) 评论(0) 推荐(0) 编辑

Implement Trie and find longest prefix string list

摘要: 1 package leetcode; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 class TrieNode{ 7 Boolean isWord;//true if path till ... 阅读全文

posted @ 2015-03-30 07:37 Step-BY-Step 阅读(154) 评论(0) 推荐(0) 编辑

导航