Tag: C++ hash map
You are given two strings s and t which both have length n. You can pick one character in s and another in t and swap them. Given you …
You have a queue of integers, you need to retrieve the first unique integer in the queue. Implement the FirstUnique class: FirstUnique(int nums) Initializes the object with the numbers …
We define a harmounious array as an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer array, you need …