companyhub
DashboardCompaniesProblemsSheetsBookmarksRevisionsAnalyticsLeaderboardCompare
Settings
Sign in
DashboardCompaniesProblemsSheetsBookmarks
Medium

Insert Delete GetRandom O(1)

55.4% acceptance · asked by 39 companies

Solve on LeetCode
ArrayHash TableMathDesignRandomized

Workspace

Scratch, run, iterate — then submit on LeetCode

Custom input (stdin)

Console

Output appears here. Runs on the free Piston sandbox.

Your notes

Sign in to keep markdown notes on this problem — approach, complexity, gotchas.

Who asks this

Peloton100Pocket Gems100Okta100Ixigo100Affirm
100
Axon100
Bloomberg100
Twitter100
Sofi100
Yelp100
Quora100
Grammarly88
Docusign88
Zeta75
Apple75
Citadel75
Ixl75
Linkedin75
Pure Storage75
Uber75
Yandex75
DE Shaw63
Palo Alto Networks63
Amazon63

Related problems

Two Sum
Easy
Merge Intervals
Medium
Best Time to Buy and Sell Stock
Easy
Group Anagrams
Medium
Number of Islands
Medium