上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 68 下一页
摘要: 题目如下: Given a list of words, each word consists of English lowercase letters. Let's say word1 is a predecessor of word2 if and only if we can add exac 阅读全文
posted @ 2019-05-21 14:38 seyjs 阅读(2002) 评论(0) 推荐(0)
摘要: 题目如下: Given a string S of lowercase letters, a duplicate removal consists of choosing two adjacent and equal letters, and removing them. We repeatedly 阅读全文
posted @ 2019-05-21 14:33 seyjs 阅读(307) 评论(0) 推荐(0)
摘要: 题目如下: We have a collection of rocks, each rock has a positive integer weight. Each turn, we choose the two heaviest rocks and smash them together. Sup 阅读全文
posted @ 2019-05-21 14:30 seyjs 阅读(602) 评论(0) 推荐(0)
摘要: 先看一段代码: 按照C++的经验,想当然第一行输出是2,第二行是 openssh;可是实际输出却是11和"o"。最终查找资料有如下发现: 1、如果用“.”作为分隔的话,应该是String.split("\\."),不能用String.split("."); 2、如果用“|”作为分隔的话,应该是Str 阅读全文
posted @ 2019-05-15 16:07 seyjs 阅读(226) 评论(0) 推荐(0)
摘要: 题目如下: Three stones are on a number line at positions a, b, and c. Each turn, you pick up a stone at an endpoint (ie., either the lowest or highest pos 阅读全文
posted @ 2019-05-12 21:35 seyjs 阅读(328) 评论(0) 推荐(0)
摘要: 题目如下: On an infinite plane, a robot initially stands at (0, 0) and faces north. The robot can receive one of three instructions: "G": go straight 1 un 阅读全文
posted @ 2019-05-12 21:24 seyjs 阅读(511) 评论(0) 推荐(0)
摘要: 题目如下: A boomerang is a set of 3 points that are all distinct and not in a straight line. Given a list of three points in the plane, return whether the 阅读全文
posted @ 2019-05-07 10:42 seyjs 阅读(384) 评论(0) 推荐(0)
摘要: 题目如下: Given an array of integers nums, sort the array in ascending order. Example 1: Example 2: Note: 解题思路:题目没说不能用系统函数。 代码如下: 阅读全文
posted @ 2019-04-27 19:27 seyjs 阅读(318) 评论(0) 推荐(0)
摘要: 题目如下: We run a preorder depth first search on the root of a binary tree. At each node in this traversal, we output D dashes (where D is the depth of t 阅读全文
posted @ 2019-04-24 23:12 seyjs 阅读(236) 评论(0) 推荐(0)
摘要: 题目如下: Given an array A of integers, return the length of the longest arithmetic subsequence in A. Recall that a subsequence of A is a list A[i_1], A[i 阅读全文
posted @ 2019-04-24 23:06 seyjs 阅读(926) 评论(0) 推荐(0)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 68 下一页