Showing 3 questions
Given a set of distinct integers, your task is to generate all possible subsets (the power set). The solution should not contain duplicate subsets.
#1. Subsets
Given an array, rotate the elements to the right by a specified number of steps. The goal is to modify the original array in-place with the rotated elements.
#2. Rotate Array
Design a data structure that acts as a Least Recently Used (LRU) cache. Implement methods to get and put key-value pairs, evicting the least recently used entry when the cache is full.
#3. LRU Cache