2015年1月15日

Majority Element

摘要: Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume that the arr... 阅读全文

posted @ 2015-01-15 17:38 Step-BY-Step 阅读(118) 评论(0) 推荐(0) 编辑

Largest Number

摘要: Given a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the largest formed num... 阅读全文

posted @ 2015-01-15 17:18 Step-BY-Step 阅读(122) 评论(0) 推荐(0) 编辑

Fraction to Recurring Decimal

摘要: Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating,... 阅读全文

posted @ 2015-01-15 16:59 Step-BY-Step 阅读(183) 评论(0) 推荐(0) 编辑

Compare Version Numbers

摘要: Compare two version numbersversion1andversion1.Ifversion1>version2return 1, ifversion1 Integer.valueOf(parts2[i])) return 1;10 if(Integer.... 阅读全文

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

导航