1.1.1 输入分片和记录 (1)输入分片InputSplit接口 输入分片一般是文件,也可以数据库中的若干行。记录对应一行数据。输入分片在java表示为InputSplit接口,getlength函数返回大小,用于分片排序,大的先处理。Getlocation函数返回分片位置,让map任务尽量本地化 ...
分类:
其他好文 时间:
2020-02-03 11:30:47
阅读次数:
69
准备刷题了!已经预见未来的日子是苦并快乐的了!但越努力,才能越有底气呀!?? 由于本人主要使用 PHP 语言,所以刷题主要用 PHP 来写代码,自学 Go 中,时间精力都允许的情况下看看能不能用 Go 语言刷一遍,巩固语法知识点???♀? 由易到难,走起!?? 数组 " 1 | Two Sum 两数 ...
分类:
其他好文 时间:
2020-02-02 23:48:43
阅读次数:
83
外观数列」是一个整数序列,从数字 1 开始,序列中的每一项都是对前一项的描述。前五项如下: 1. 12. 113. 214. 12115. 1112211 被读作 "one 1" ("一个一") , 即 11。11 被读作 "two 1s" ("两个一"), 即 21。21 被读作 "one 2", ...
分类:
其他好文 时间:
2020-02-02 17:33:39
阅读次数:
136
Given a binary tree . Split the binary tree into two subtrees by removing 1 edge such that the product of the sums of the subtrees are maximized. Sinc ...
分类:
其他好文 时间:
2020-02-02 15:59:08
阅读次数:
110
题目内容 You are given two non empty linked lists representing two non negative integers. The most significant digit comes first and each of their nodes c ...
分类:
其他好文 时间:
2020-02-02 15:26:42
阅读次数:
87
1 class Solution: 2 def minSetSize(self, arr: 'List[int]') -> int: 3 m = len(arr) 4 dic = {} 5 for i in range(m): 6 if arr[i] in dic: 7 dic[arr[i]] += ...
分类:
其他好文 时间:
2020-02-02 14:01:32
阅读次数:
59
82. Remove Duplicates from Sorted List II Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from ...
分类:
其他好文 时间:
2020-02-02 12:06:41
阅读次数:
68
题目链接 https://atcoder.jp/contests/agc035/tasks/agc035_f 题解 B题难度的F题……然而我还是不会 假设第$i$行染的长度是$a_i$, 第$j$列是$b_j$ 考虑什么情况下两种方案会重复: 若存在$i,j$使得$a_i+1=j$且$b_j=i$, ...
分类:
其他好文 时间:
2020-02-02 01:22:38
阅读次数:
143
1 """ 2 Given an array of integers, return indices of the two numbers such that they add up to a specific target. 3 4 You may assume that each input w ...
分类:
其他好文 时间:
2020-02-01 23:27:36
阅读次数:
86