摘要: Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp... 阅读全文
posted @ 2014-10-27 02:56 Phoebe815 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST.Solution:/** * Definition for binary tree * public cl... 阅读全文
posted @ 2014-10-27 02:19 Phoebe815 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Solution: 1 public class Solution { 2 pu... 阅读全文
posted @ 2014-10-27 01:12 Phoebe815 阅读(139) 评论(0) 推荐(0) 编辑