摘要: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements 阅读全文
posted @ 2018-09-20 14:52 轻风舞动 阅读(894) 评论(0) 推荐(1) 编辑
摘要: Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one. Note: Your al 阅读全文
posted @ 2018-09-20 14:46 轻风舞动 阅读(518) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti 阅读全文
posted @ 2018-09-20 13:55 轻风舞动 阅读(517) 评论(0) 推荐(0) 编辑
摘要: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total num 阅读全文
posted @ 2018-09-20 08:39 轻风舞动 阅读(351) 评论(0) 推荐(0) 编辑
摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2018-09-20 08:21 轻风舞动 阅读(460) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o 阅读全文
posted @ 2018-09-20 05:19 轻风舞动 阅读(357) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: E 阅读全文
posted @ 2018-09-20 04:09 轻风舞动 阅读(500) 评论(0) 推荐(0) 编辑