Showing 3 of 26 questions
You are given a collection of intervals. Merge all overlapping intervals into a single interval and return the result.
#1. Merge Intervals
You're given a string and need to repeatedly remove adjacent, identical characters until no more duplicates exist. Return the final string after all such removals.
#2. Remove All Adjacent Duplicates In String
Design a data structure that supports insert, delete, and getRandom operations, all in average O(1) time. The getRandom method should return a random element from the current set of elements.
#3. Insert Delete GetRandom O(1)