摘要: Given an array ofnintegers wheren> 1,nums, return an arrayoutputsuch thatoutput[i]is equal to the product of all the elements ofnumsexceptnums[i].Solv... 阅读全文
posted @ 2015-10-08 04:48 Hygeia 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Given an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements t... 阅读全文
posted @ 2015-10-08 04:32 Hygeia 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Given an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements t... 阅读全文
posted @ 2015-10-08 04:30 Hygeia 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Follow upforH-Index: What if thecitationsarray is sorted in ascending order? Could you optimize your algorithm?要求用二分法做。 1 public class Solution { 2 ... 阅读全文
posted @ 2015-10-08 04:12 Hygeia 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.According ... 阅读全文
posted @ 2015-10-08 03:41 Hygeia 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters... 阅读全文
posted @ 2015-10-08 03:13 Hygeia 阅读(112) 评论(0) 推荐(0) 编辑