> For the complete documentation index, see [llms.txt](https://wentao-shao.gitbook.io/leetcode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wentao-shao.gitbook.io/leetcode/data-structure/381.insert-delete-getrandom-o-1-duplicates-allowed-data-structure-381.insert-delete-getrandom-o-1-du.md).

# \[381.Insert-Delete-GetRandom-O(1)---Duplicates-allowed]\(Data-Structure/381.Insert-Delete-GetRandom-O
