You are given an array of integers arr and an integer k. You need to remove exactly k elements from the array and find the minimum number of unique integers that remain in the array.
You are given an array of integers arr of even length n and an integer k. The task is to check if you can divide the array into exactly n / 2 pairs such that the sum of each pair is divisible by k. Return true if it’s possible to divide the array into valid pairs, otherwise return false.
You are given an array of integers. A pair (i, j) is called a good pair if nums[i] == nums[j] and i < j. Your task is to find the number of good pairs in the array.
You are given a tree with n nodes, where each node has a label, and your task is to find the number of nodes in the subtree rooted at each node that have the same label as that node.
You are tasked with designing a parking system for a parking lot that has three types of parking spaces: large, medium, and small. Each type of parking space has a fixed number of available slots. Your goal is to implement the ParkingSystem class that supports the operations of initializing the parking system and parking a car based on its type.
Two strings are considered transformable into each other if you can convert one into the other by performing a series of operations. These operations include swapping any two characters or transforming all occurrences of one character into another.