Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 #2

Open
wants to merge 568 commits into
base: master
Choose a base branch
from
Open

1 #2

Changes from 1 commit
Commits
Show all changes
568 commits
Select commit Hold shift + click to select a range
c455971
update
peckfly Apr 9, 2019
edd4fd8
update
peckfly Apr 9, 2019
0183766
update
peckfly Apr 9, 2019
dd0d2dd
update
peckfly Apr 9, 2019
fd75f26
update
peckfly Apr 9, 2019
e73d80d
update
peckfly Apr 9, 2019
2bd87e8
update
peckfly Apr 9, 2019
34a7105
update
peckfly Apr 10, 2019
4752419
update
peckfly Apr 10, 2019
5213452
update
peckfly Apr 10, 2019
a6534dd
update
peckfly Apr 10, 2019
9cc1840
update
peckfly Apr 10, 2019
4bef301
update
peckfly Apr 10, 2019
4fd11f6
update
peckfly Apr 10, 2019
f04d4af
update
peckfly Apr 10, 2019
3ae933e
update
peckfly Apr 10, 2019
9400a3c
update
peckfly Apr 10, 2019
4c4af62
update
peckfly Apr 10, 2019
a3739ca
update
peckfly Apr 10, 2019
97e7014
update
peckfly Apr 10, 2019
e95419d
update
peckfly Apr 10, 2019
8a8a451
update
peckfly Apr 10, 2019
a4cd154
update
peckfly Apr 10, 2019
c1193ec
update
peckfly Apr 10, 2019
3787595
update
peckfly Apr 10, 2019
d44f361
update
peckfly Apr 10, 2019
80cc6b0
update
peckfly Apr 10, 2019
e57a768
update
peckfly Apr 10, 2019
b825e61
update
peckfly Apr 10, 2019
81b0f9e
update
peckfly Apr 10, 2019
15c1da4
update
peckfly Apr 10, 2019
909b69f
update
peckfly Apr 10, 2019
1866c3e
update
peckfly Apr 10, 2019
b7c5a57
update
peckfly Apr 10, 2019
ff37eb2
update
peckfly Apr 10, 2019
340114f
update
peckfly Apr 10, 2019
89a93d7
update
peckfly Apr 10, 2019
5a318fe
update
peckfly Apr 10, 2019
c4d9e2b
update
peckfly Apr 10, 2019
6667aa9
update
peckfly Apr 10, 2019
f1efe4b
update
peckfly Apr 10, 2019
412bb6b
update
peckfly Apr 10, 2019
729d5f2
update
peckfly Apr 10, 2019
1666b97
update
peckfly Apr 10, 2019
db48b47
update
peckfly Apr 11, 2019
afa74d8
update
peckfly Apr 11, 2019
c949fa8
update
peckfly Apr 11, 2019
d120888
update
peckfly Apr 11, 2019
71de056
update
peckfly Apr 11, 2019
bdca2ad
update
peckfly Apr 11, 2019
1e16797
update
peckfly Apr 11, 2019
5147ed4
update
peckfly Apr 11, 2019
d0155d8
update
peckfly Apr 11, 2019
1a8609f
update
peckfly Apr 11, 2019
fbea2c5
update
peckfly Apr 11, 2019
22f3772
update
peckfly Apr 11, 2019
b907edd
update
peckfly Apr 11, 2019
ff9d690
update
peckfly Apr 11, 2019
c166365
update
peckfly Apr 11, 2019
f50b56b
update
peckfly Apr 11, 2019
7be8947
update
peckfly Apr 11, 2019
94d42e1
update
peckfly Apr 11, 2019
922cc67
update
peckfly Apr 11, 2019
496c206
update
peckfly Apr 11, 2019
cd16b52
update
peckfly Apr 11, 2019
a34e1f2
update
peckfly Apr 11, 2019
93b4907
update
peckfly Apr 11, 2019
5e7bfcb
update
peckfly Apr 12, 2019
89344ab
update
peckfly Apr 12, 2019
81e4e4e
update
peckfly Apr 12, 2019
51bee33
update
peckfly Apr 12, 2019
4f82622
update
peckfly Apr 12, 2019
b5372a8
update
peckfly Apr 12, 2019
1253b2f
update
peckfly Apr 12, 2019
9b77720
update
peckfly Apr 12, 2019
a5bd88c
update
peckfly Apr 12, 2019
ffef124
update
peckfly Apr 12, 2019
5ea8a95
update
peckfly Apr 12, 2019
0b8cd70
update
peckfly Apr 12, 2019
6551c96
update
peckfly Apr 12, 2019
b0fa731
update
peckfly Apr 12, 2019
32939ec
update
peckfly Apr 12, 2019
6f20810
update
peckfly Apr 12, 2019
86a7d76
update
peckfly Apr 12, 2019
9b8d84f
update
peckfly Apr 12, 2019
5710114
update
peckfly Apr 12, 2019
09e14e5
update
peckfly Apr 12, 2019
114107f
update
peckfly Apr 12, 2019
b892ad2
update
peckfly Apr 12, 2019
9450aab
update
peckfly Apr 12, 2019
ecd1652
update
peckfly Apr 12, 2019
1c15cdb
update
peckfly Apr 12, 2019
5356861
update
peckfly Apr 12, 2019
aa28e8e
update
peckfly Apr 12, 2019
2872b7b
update
peckfly Apr 12, 2019
852331e
update
peckfly Apr 12, 2019
4f09e50
update
peckfly Apr 12, 2019
ce10b1d
update
peckfly Apr 12, 2019
719fb35
update
peckfly Apr 12, 2019
6e681b4
update
peckfly Apr 12, 2019
b21e764
update
peckfly Apr 12, 2019
3a589a5
update
peckfly Apr 12, 2019
407e1e9
update
peckfly Apr 12, 2019
0b95f5c
update
peckfly Apr 12, 2019
4e6cd3b
update
peckfly Apr 12, 2019
435e62f
update
peckfly Apr 12, 2019
827185d
update
peckfly Apr 12, 2019
ca5c20b
update
peckfly Apr 12, 2019
ac67498
update
peckfly Apr 12, 2019
424b61d
update
peckfly Apr 12, 2019
d7aed52
update
peckfly Apr 12, 2019
79b2902
update
peckfly Apr 12, 2019
67dc4c6
update
peckfly Apr 12, 2019
31aec26
update
peckfly Apr 12, 2019
55c118a
update
peckfly Apr 13, 2019
8fd15a9
update
peckfly Apr 13, 2019
e2063e9
update
peckfly Apr 13, 2019
54e5a45
update
peckfly Apr 13, 2019
7087ddf
update
peckfly Apr 13, 2019
65bf684
update
peckfly Apr 14, 2019
846f962
update
peckfly Apr 14, 2019
f44d372
update
peckfly Apr 14, 2019
2a97497
update
peckfly Apr 14, 2019
aeb48b3
update
peckfly Apr 14, 2019
a181f39
update
peckfly Apr 14, 2019
277adc7
update
peckfly Apr 14, 2019
fe780cd
update
peckfly Apr 15, 2019
cab8af2
update
peckfly Apr 15, 2019
1999e3a
update
peckfly Apr 15, 2019
3ba1004
update
peckfly Apr 15, 2019
75f93d8
update
peckfly Apr 15, 2019
5527756
update
peckfly Apr 16, 2019
a6be9b7
update
peckfly Apr 16, 2019
77a5076
update
peckfly Apr 17, 2019
61c7907
update
peckfly Apr 17, 2019
c069967
update
peckfly Apr 18, 2019
4a6b5fa
update
peckfly Apr 18, 2019
cf22843
update
peckfly Apr 19, 2019
360331d
update
peckfly Apr 19, 2019
389051f
update
peckfly Apr 20, 2019
2e31da3
update
peckfly Apr 20, 2019
ea0dd1c
update
peckfly Apr 25, 2019
6473e84
update
peckfly Apr 25, 2019
d9cce5d
update
peckfly Apr 25, 2019
3581f71
update
peckfly Apr 27, 2019
4101dbf
add
peckfly Apr 30, 2019
18fa824
add
peckfly Apr 30, 2019
5017441
add
peckfly Apr 30, 2019
0dd76c4
add
peckfly Apr 30, 2019
9af2331
update
peckfly May 3, 2019
7db95f2
update
peckfly May 3, 2019
4f39f97
update
peckfly May 4, 2019
028fcec
update
peckfly May 5, 2019
f82432d
update
peckfly May 5, 2019
9ff41a7
add SpringBoot AutoConfiguration notes
peckfly May 6, 2019
aa5869b
update
peckfly May 6, 2019
f74f048
update
peckfly May 6, 2019
c5b3fdd
update
peckfly May 9, 2019
754b8f1
update
peckfly May 10, 2019
8be4de3
update
peckfly May 10, 2019
fd1b1ca
update
peckfly May 10, 2019
0ab1cb0
update
peckfly May 11, 2019
b00b268
update
peckfly May 11, 2019
04f5393
update
peckfly May 11, 2019
ef9dbac
update
peckfly May 11, 2019
686e05a
update
peckfly May 12, 2019
7671a05
update
peckfly May 12, 2019
11a664f
update
peckfly May 12, 2019
5d9aa36
update
peckfly May 13, 2019
e398f7e
update
peckfly May 13, 2019
d997f2e
update
peckfly May 14, 2019
20ffe1e
update
peckfly May 14, 2019
09fd930
update
peckfly May 14, 2019
aff8088
update
peckfly May 14, 2019
349e541
update
peckfly May 14, 2019
7bba679
update
peckfly May 14, 2019
f73cdc3
update
peckfly May 17, 2019
2804264
update
peckfly May 17, 2019
71a5264
update
peckfly May 17, 2019
1a8fc25
update
peckfly May 18, 2019
4d3cd0e
update
peckfly May 18, 2019
6729898
update
peckfly May 18, 2019
6dfbae6
update
peckfly May 18, 2019
e29082a
update
peckfly May 23, 2019
560fb29
update
peckfly May 26, 2019
16d53bb
update
peckfly May 26, 2019
ab76864
将JVM部分两个简单文档合并到Jvm总结(二)中
peckfly Jun 2, 2019
f4d30f9
更新【类加载部分】
peckfly Jun 2, 2019
3773990
update
peckfly Jun 8, 2019
714a029
modify
peckfly Jul 16, 2019
4044773
修改java8
peckfly Jul 19, 2019
7bae540
d
peckfly Jul 19, 2019
377cfec
d
peckfly Jul 20, 2019
65674aa
修改JVM
peckfly Jul 21, 2019
dd04b4a
change
peckfly Jul 21, 2019
b3f1036
update
peckfly Jul 21, 2019
c7c27cd
update
peckfly Jul 21, 2019
8e49406
update
peckfly Jul 21, 2019
a07868c
update
peckfly Jul 21, 2019
570e011
update
peckfly Jul 22, 2019
b9b377a
update
peckfly Jul 23, 2019
5f83fbf
update
peckfly Jul 26, 2019
1a972dc
update
peckfly Jul 28, 2019
ddc423b
update
peckfly Aug 1, 2019
eb266d4
update
peckfly Aug 2, 2019
a823ff1
update
peckfly Aug 2, 2019
f10aaba
update
Aug 2, 2019
bdc8db5
fixed conflict
Aug 2, 2019
f39cbe2
update
Aug 4, 2019
5ca820c
update
Aug 5, 2019
127b6df
update
Aug 8, 2019
3acfcc3
update
Aug 9, 2019
fb651cf
update
Aug 11, 2019
fd41440
update
peckfly Aug 12, 2019
afd010a
update
Aug 14, 2019
1a5c502
update
peckfly Aug 15, 2019
56a9b0f
update
Aug 15, 2019
1054718
update
peckfly Aug 15, 2019
13659d5
update
peckfly Aug 17, 2019
50ff1ba
update
peckfly Aug 19, 2019
573409b
update
peckfly Aug 20, 2019
996c0e3
update
Aug 20, 2019
ab02cb9
update
Aug 21, 2019
afd9076
update
peckfly Aug 25, 2019
60d9cd6
update
peckfly Aug 25, 2019
c70eb9d
update
peckfly Aug 25, 2019
9e9a14e
update
peckfly Aug 25, 2019
53c37d3
update
peckfly Aug 29, 2019
01241c6
update
peckfly Aug 30, 2019
cb0a741
update
peckfly Sep 1, 2019
2b6cb90
update
peckfly Sep 1, 2019
116d990
update
peckfly Sep 16, 2019
68d62eb
update
peckfly Oct 24, 2019
3ac6a5b
update
peckfly Oct 28, 2019
abc2e2f
update
peckfly Nov 4, 2019
6117654
update
peckfly Nov 4, 2019
85f130f
update
peckfly Nov 11, 2019
2bef932
update
peckfly Nov 11, 2019
51e525c
update
peckfly Nov 11, 2019
f658e64
update
peckfly Nov 11, 2019
0ea47f3
update
peckfly Nov 13, 2019
6685111
update
peckfly Nov 17, 2019
2766c88
update
peckfly Nov 17, 2019
aeb0404
update
peckfly Nov 17, 2019
408cdc7
update
peckfly Dec 6, 2019
7a000e2
update
Dec 16, 2019
15427a1
update
Dec 16, 2019
bb6f252
update
Dec 16, 2019
9581e73
test
zxincool Mar 25, 2020
a7a78f4
Merge pull request #1 from ZXZxin/master
binbinbin5 Jul 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
  • Loading branch information
peckfly committed Apr 11, 2019
commit 5147ed4502e7887f3f773438d5eaf283bf39ebad
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## LeetCode - 381. Insert Delete GetRandom O(1) - Duplicates allowed(允许重复)
# LeetCode - 381. Insert Delete GetRandom O(1) - Duplicates allowed(允许重复)

#### [题目链接](https://leetcode.com/problems/insert-delete-getrandom-o1-duplicates-allowed/)

Expand All @@ -8,7 +8,7 @@
![在这里插入图片描述](images/381_t.png)

#### 解析
做这题之前先做[**LeetCode - 380**](https://blog.csdn.net/zxzxzx0119/article/details/86023769)。
做这题之前先做[**LeetCode - 380**](https://github.com/ZXZxin/ZXBlog/blob/master/%E5%88%B7%E9%A2%98/LeetCode/Data%20Structure/Map/LeetCode%20-%20380.%20Insert%20Delete%20GetRandom%20O(1)%20(%E5%B8%B8%E6%95%B0%E6%97%B6%E9%97%B4%E6%8F%92%E5%85%A5%E3%80%81%E5%88%A0%E9%99%A4%E5%92%8C%E8%8E%B7%E5%8F%96%E9%9A%8F%E6%9C%BA%E5%85%83%E7%B4%A0).md)。


这一题加上了可以加入重复的元素,题目就变得复杂了一些。
Expand All @@ -27,12 +27,17 @@
添加元素很简单,维护`map`和`list`即可。

例如添加元素`6`:

![在这里插入图片描述](images/381_s2.png)

删除元素思想也是和最后一个元素交换位置,不过也要维护相应的信息即可。

删除元素`9`:

![在这里插入图片描述](images/381_s3.png)

代码:

```java
class RandomizedCollection {

Expand Down