上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 77 下一页
摘要: [抄题]: 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 usef 阅读全文
posted @ 2018-07-26 18:21 苗妙苗 阅读(230) 评论(0) 推荐(0)
摘要: [抄题]: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or ano 阅读全文
posted @ 2018-07-26 17:03 苗妙苗 阅读(208) 评论(0) 推荐(0)
摘要: [抄题]: Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Exampl 阅读全文
posted @ 2018-07-26 14:28 苗妙苗 阅读(134) 评论(0) 推荐(0)
摘要: [抄题]: Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => true Note: It is intended f 阅读全文
posted @ 2018-07-26 09:42 苗妙苗 阅读(171) 评论(0) 推荐(0)
摘要: [抄题]: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Example 1: Example 2: [暴力解法]: 时间分析: 空间分析: [优 阅读全文
posted @ 2018-07-25 23:40 苗妙苗 阅读(154) 评论(0) 推荐(0)
摘要: [抄题]: Shuffle a set of numbers without duplicates. Example: [暴力解法]: 时间分析: 空间分析: [优化后]: 时间分析: 空间分析: [奇葩输出条件]: [奇葩corner case]: [思维问题]: [英文数据结构或算法,为什么不用 阅读全文
posted @ 2018-07-25 16:22 苗妙苗 阅读(189) 评论(0) 推荐(0)
摘要: [抄题]: Given an encoded string, return it's decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square bracket 阅读全文
posted @ 2018-07-25 10:26 苗妙苗 阅读(201) 评论(0) 推荐(0)
摘要: [抄题]: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to find the number of conn 阅读全文
posted @ 2018-07-24 17:31 苗妙苗 阅读(134) 评论(0) 推荐(0)
摘要: Sum类的题目一般这样: input: nums[], target output: satisfied arrays/ lists/ number 拿到题目,首先分析: 1. 是几个数的sum 2. sum是要求等于target还是小于还是大于还是closest 3. 返回的是原数组下标还是其他 阅读全文
posted @ 2018-07-12 17:32 苗妙苗 阅读(167) 评论(0) 推荐(0)
摘要: 计算机的基本任务之一。 举例来说,有一个字符串"BBC ABCDAB ABCDABCDABDE",我想知道,里面是否包含另一个字符串"ABCDABD"? 许多算法可以完成这个任务,Knuth-Morris-Pratt算法(简称KMP)是最常用的之一。它以三个发明者命名,起头的那个K就是著名科学家Do 阅读全文
posted @ 2018-07-07 09:50 苗妙苗 阅读(590) 评论(0) 推荐(0)
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 77 下一页