题目描述:
LeetCode 380. Insert Delete GetRandom O(1)
Design a data structure that supports all following operations in O(1) time.
insert(val)
: Inserts an item val to the set if not already present.remove(val)
: Removes an item val ...
LeetCode 380. Insert Delete GetRandom O(1)
Design a data structure that supports all following operations in O(1) time.
insert(val)
: Inserts an item val to the set if not already present.remove(val)
: Removes an item val ...LeetCode 378. Kth Smallest Element in a Sorted Matrix
Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.
Note that it is ...