上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页
摘要: Given two binary strings, return their sum (also a binary string).For example,a="11"b="1"Return"100". 1 public String addBinary(String a, String b... 阅读全文
posted @ 2015-09-11 07:39 Hygeia 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a column title as appear in an Excel sheet, return its corresponding column number.For example:A -> 1B -> 2C -> 3…Z -> 26AA -> 27AB -> 28[分析]26进... 阅读全文
posted @ 2015-09-11 05:57 Hygeia 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer... 阅读全文
posted @ 2015-09-11 05:27 Hygeia 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题目:Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes?... 阅读全文
posted @ 2015-09-10 12:48 Hygeia 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 用到的Class和methods:1. 类String(1)charAtString s;s.charAt(i);(2)split分割一个String用split:publicString[]split(Stringregex)RegexResult:{ "boo", "and", "foo" }o... 阅读全文
posted @ 2015-09-09 01:59 Hygeia 阅读(238) 评论(0) 推荐(0) 编辑
摘要: For a given sorted array (ascending order) and a target number, find the first index of this number in O(log n) time complexity.If the target number d... 阅读全文
posted @ 2015-09-03 06:46 Hygeia 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given a rotated sorted array, recover it to sorted array in-place.Have you met this question in a real interview?YesWhich company asked you this quest... 阅读全文
posted @ 2015-09-03 06:15 Hygeia 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
posted @ 2015-09-03 05:30 Hygeia 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Find the total area covered by tworectilinearrectangles in a2Dplane.Each rectangle is defined by its bottom left corner and top right corner as shown ... 阅读全文
posted @ 2015-09-02 07:29 Hygeia 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 1、题目名称Ugly Number II(丑数2:找出第n个丑数)2、题目地址https://leetcode.com/problems/ugly-number-ii/3、题目内容英文:Write a program to find then-th ugly number.中文:写程序找出第n个丑数... 阅读全文
posted @ 2015-09-02 07:08 Hygeia 阅读(295) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页