Tag: C++ unordered_map
You are given the array paths, where paths = means there exists a direct path going from cityAi to cityBi. Return the destination city, that is, the city without …
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example 1: Input: 1-2-3-3-4-4-5 Output: 1-2-5 Example 2: Input: …
Given an array of integers arr, write a function that returns true if and only if the number of occurrences of each value in the array is unique. Example …
Given an array of integers and a target value, find the number of distinct pairs that sum to the target. The pairs (x,y) and (x’, y’) where x smaller …
Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = “anagram”, t = “nagaram”, return true. s …