
Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
History is littered with hundreds of conflicts over the future of a community, group, location or business that were "resolved" when one of the parties stepped ahead and destroyed what was there. With the original point of contention destroyed, the debates would fall to the wayside. Archive Team believes that by duplicated condemned data, the conversation and debate can continue, as well as the richness and insight gained by keeping the materials. Our projects have ranged in size from a single volunteer downloading the data to a small-but-critical site, to over 100 volunteers stepping forward to acquire terabytes of user-created data to save for future generations.
The main site for Archive Team is at archiveteam.org and contains up to the date information on various projects, manifestos, plans and walkthroughs.
This collection contains the output of many Archive Team projects, both ongoing and completed. Thanks to the generous providing of disk space by the Internet Archive, multi-terabyte datasets can be made available, as well as in use by the Wayback Machine, providing a path back to lost websites and work.
Our collection has grown to the point of having sub-collections for the type of data we acquire. If you are seeking to browse the contents of these collections, the Wayback Machine is the best first stop. Otherwise, you are free to dig into the stacks to see what you may find.
The Archive Team Panic Downloads are full pulldowns of currently extant websites, meant to serve as emergency backups for needed sites that are in danger of closing, or which will be missed dearly if suddenly lost due to hard drive crashes or server failures.
Given a string
Sthat only contains "I" (increase) or "D" (decrease), letN = S.length.Return any permutation
Aof[0, 1, ..., N]such that for alli = 0, ..., N-1:S[i] == "I", thenA[i] < A[i+1]S[i] == "D", thenA[i] > A[i+1]Example 1:
Example 2:
Example 3:
Note:
1 <= S.length <= 10000Sonly contains characters"I"or"D".这道题给了一个只有 'D' 和 'I' 两个字母组成的字符串,表示一种 pattern,其中 'D' 表示需要下降 Decrease,即当前数字大于下个数字,同理,'i' 表示需要上升 Increase,即当前数字小于下个数字,让返回符合这个要求的任意一个数组,还有个要求是该数组必须是 [0, n] 之间的所有数字的一种全排列,其中n是给定 pattern 字符串的长度。这表明了返回数组不能有重复数字,这里一会上升一会下降的,很容易产生重复数字,难不成还要不停的检测是否有重复数字么,不,这样太麻烦了,必须想一种生成方法来保证绝对不会有重复数字。对于上升来说,可以从0开始累加,而对于下降来说,则可以从n开始下降,这样保证了在结束之前二者绝不会相遇,到最后一个数字的时候二者相同,再将这个相同数字加入即可,因为返回的数组的个数始终会比给定字符串长度大1个,参见代码如下:
Github 同步地址:
#942
参考资料:
https://leetcode.com/problems/di-string-match/
https://leetcode.com/problems/di-string-match/discuss/194906/C%2B%2B-4-lines-high-low-pointers
https://leetcode.com/problems/di-string-match/discuss/194904/C%2B%2BJavaPython-Straight-Forward
LeetCode All in One 题目讲解汇总(持续更新中...)
The text was updated successfully, but these errors were encountered: