上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 50 下一页
摘要: Given a text file file.txt, print just the 10th line of the file. Example: Assume that file.txt has the following content: Your script should output t 阅读全文
posted @ 2018-10-12 02:20 轻风舞动 阅读(551) 评论(0) 推荐(0) 编辑
摘要: Given two 1d vectors, implement an iterator to return their elements alternately. For example, given two 1d vectors: By calling next repeatedly until  阅读全文
posted @ 2018-10-11 14:49 轻风舞动 阅读(666) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3].... Example 1: Example 2: Note:You may assume all input has v 阅读全文
posted @ 2018-10-11 13:42 轻风舞动 阅读(2319) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3].... For example, given nums = [3, 5, 2, 1, 6, 4], 阅读全文
posted @ 2018-10-11 13:41 轻风舞动 阅读(695) 评论(0) 推荐(0) 编辑
摘要: Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating 阅读全文
posted @ 2018-10-11 08:45 轻风舞动 阅读(396) 评论(0) 推荐(0) 编辑
摘要: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to 阅读全文
posted @ 2018-10-11 07:59 轻风舞动 阅读(743) 评论(0) 推荐(0) 编辑
摘要: Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the first string's permutati 阅读全文
posted @ 2018-10-10 09:04 轻风舞动 阅读(1065) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2018-10-10 08:36 轻风舞动 阅读(527) 评论(0) 推荐(0) 编辑
摘要: Design a Phone Directory which supports the following operations: Example: 设计一个电话目录有3个功能,get: 给出一个没有使用的电话号码,check: 查验一个电话号码是否被使用了,release: 释放一个电话号码,使其 阅读全文
posted @ 2018-10-10 05:06 轻风舞动 阅读(815) 评论(0) 推荐(0) 编辑
摘要: On a horizontal number line, we have gas stations at positions stations[0], stations[1], ..., stations[N-1], where N = stations.length. Now, we add K  阅读全文
posted @ 2018-10-10 01:43 轻风舞动 阅读(1170) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 50 下一页