You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl ...
分类:
其他好文 时间:
2020-01-21 16:15:13
阅读次数:
70
There are nn Christmas trees on an infinite number line. The ii -th tree grows at the position xixi . All xixi are guaranteed to be distinct. Each int ...
分类:
其他好文 时间:
2020-01-21 13:20:26
阅读次数:
96
1020 Tree Traversals (25分) Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequen ...
分类:
其他好文 时间:
2020-01-20 20:53:02
阅读次数:
76
比如两个rdd 两个分区合并去他们的并集 intersection 去数据的交集 subtract去差集 mappartition与map像是遍历的单位是每个pation分区的数据进来的是iterrter是迭代器 distinct去重(map+reducebykey+map) cogroup 作用在 ...
分类:
其他好文 时间:
2020-01-19 11:04:30
阅读次数:
97
给定由若干长度 <= N 的 01 字符串组成的集合 S。请找到长度最长的串 t(如果有多个选字典序最小的),使得存在 >= K 个 S 中的字符串,使得 t 是这些字符串的子序列。 ...
分类:
其他好文 时间:
2020-01-19 09:43:45
阅读次数:
67
A. Two distinct points You are given two segments l1;r1 and l2;r2 on the xx-axis. It is guaranteed that l1<r1l1<r1 and l2<r2l2<r2. Segments may inters ...
分类:
其他好文 时间:
2020-01-18 13:03:13
阅读次数:
98
题目: Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1: Input: [1,3,5,4,7] Output: 2 Explanation: The t ...
分类:
编程语言 时间:
2020-01-17 19:04:48
阅读次数:
77
原题链接在这里:https://leetcode.com/problems/shortest-way-to-form-string/ 题目: From any string, we can form a subsequence of that string by deleting some numb ...
分类:
其他好文 时间:
2020-01-17 10:01:32
阅读次数:
91
"?? ?? ??" 题意:一个字符串s,t个字符串p, 判断p是不是s的子序列 预处理 出对于字符串s, 每个位置i之后第一个字母x的位置 ,匹配子序列的时候就相当于在母串上往后跳,如果跳到母串末尾,子序列还没有结束,匹配失败。 然而!超时了QAQ,只能过八组样例,网上也只能找到过九组的,,,希望 ...
分类:
其他好文 时间:
2020-01-16 22:24:31
阅读次数:
106
1.原始数据 Key value Transformations(example: ((1, 2), (3, 4), (3, 6))) 2. flatMap测试示例 执行结果: 3.distinct、reducebykey、groupbykey 4.combineByKey(create Combi ...
分类:
其他好文 时间:
2020-01-16 19:01:28
阅读次数:
97