-
Updated
Apr 4, 2020
Data structures
A data structure is a particular way storing and organizing data in a computer for efficient access and modification. Data structures are designed for a specific purpose. Examples include arrays, linked lists, and classes.
Here are 7,774 public repositories matching this topic...
集合 S 包含从1到 n 的整数。不幸的是,因为数据错误,导致集合里面某一个元素复制了成了集合里面的另外一个元素的值,导致集合丢失了一个整数并且有一个元素重复。
给定一个数组 nums 代表了集合 S 发生错误后的结果。你的任务是首先寻找到重复出现的整数,再找到丢失的整数,将它们以数组的形式返回。
示例 1:
输入: nums = [1,2,2,4]
输出: [2,3]
注意:
给定数组的长度范围是 [2, 10000]。
给定的数组是无序的。
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/set-mismatch
-
Updated
Apr 1, 2020 - Swift
-
Updated
Apr 5, 2020
-
Updated
Mar 18, 2020 - C++
true.type() return « java.lang.Boolean » and not « boolean » and null.type() doesn't return « null »
Describe the bug
| Expression | Result | Expected result |
|---|---|---|
| true.type() | "java.lang.Boolean" | "boolean" |
| (1).type() | "number" | "number" |
| "A".type() | "string" | "string" |
| now().type() | "date" | "date" |
| [].type() | "array" | "array" |
| null.type() | undefined | "null" |
To Reproduce
Steps to reproduce the behavior:
- Go to 'Edit cells -> Transforms…'
- Enter 'true.type()' in the Expre
-
Updated
Feb 27, 2020 - Java
The documentation of the boltons.timeutils.daterange function only mention date objects as input, but I discovered that it works with datetime objects as well. Explicitly stating so would be great. Thanks!
-
Updated
Apr 4, 2020 - JavaScript
add git 使用指南
首先,十分欢迎你来给 OI WIki 开 issue,在提交之前,请花时间阅读一下这个模板的内容,谢谢合作!
- 希望添加的是什么?
git 使用指南
- 英文叫什么?
git-guidebook
- 有什么参考资料?
https://git-scm.com/docs
https://git-scm.com/book/zh/v2
issue 标题请写为 'add ' + 要添加的内容
然后可以在 htc 里 link 一下。(我刚开始写 Wiki 的时候就不知道怎么做到“一个 pr 只干一件事”)
左/右位移沒有解釋UB的情況
-
Updated
Apr 4, 2020 - C++
-
Updated
Oct 26, 2019 - Python
-
Updated
Mar 26, 2020 - C++
I'd suggest a better differentiation between Best and Breadth First Search in the Graphs section.
Acronyms BFS and DFS are used all over the place, but "breadth" and "depth" aren't mentioned anywhere, making it hard for a newcomer to understand what is being referred to.
steps to reproduce
Write a loop, from 1 to 80000, each time add a random int to the max heap.
In theory it takes very little time(NlogN, N=80000, <1sec ), but the program does take a long time.
I'v also tested the BinaryHeap in https://github.com/SolutionsDesign/Algorithmia, it performs well, so it is probably due to the bad algorithm.
-
Updated
Mar 14, 2020 - Swift
-
Updated
Oct 26, 2019 - JavaScript
-
Updated
Mar 25, 2020
Hi, I'm not sure if more platforms are interesting to you, but I've made a slightly more complete implementation of padding a struct to the cache line size here:
https://github.com/tinco/cache_line_size
I got the information on the cache line sizes from the Go compiler repository, so I'm pretty sure these are correct for all platforms Go runs on, which is a whole bunch.
-
Updated
Aug 18, 2018 - JavaScript
It's not easy to understand what the code generators under jctools-build are supposed to do. I think one or two phases documenting their goal would be useful.
I am proposing to document these classes:
- JavaParsingAtomicArrayQueueGenerator.java
- JavaParsingAtomicLinkedQueueGenerator.java
- JavaParsingAtomicQueueGenerator.java
-
Updated
Apr 1, 2020 - TypeScript
-
Updated
Feb 28, 2020 - Rust
-
Updated
Mar 24, 2020 - JavaScript
Yes, I know I could examine all the headers available, but it'd be nice if each documentation page listed which header(s) you need to include to use it.
-
Updated
Oct 6, 2018 - Go
The documentation gives some hints that the default hashtable and hashset implementation are assuming C strings as keys. However, the "official" documentation use some defines that have been removed in the meantime, i.e. in 9b4c3cb. As of now using the hashing data structures with anything but strings as keys is rather a PITA. There is al
https://github.com/trekhleb/javascript-algorithms/blob/master/src/algorithms/sets/cartesian-product/cartesianProduct.js#L8
I think it makes more sense to return an empty array