Algorithm · Bloomberg · Medium
Only the problem titles were provided, so I solved the standard interpretations below. If your assessment uses a different input/output format, please share the full problem statements. Problem 1 — Generate All Subsets of a Set Given a list of unique elements nums, return all possible subsets, also known as the power set. Example: Complexity: $$O(n \cdot 2^n)$$ time, because there are $$2^n$$ subsets and each subset copy takes up to $$n$$ operations. The output space is also…
Checking your access…