Category: c / c++
Given the root of a binary tree, each node has a value from 0 to 25 representing the letters ‘a’ to ‘z’: a value of 0 represents ‘a’, a …
You are given an array coordinates, coordinates = , where represents the coordinate of a point. Check if these points make a straight line in the XY plane. Input: …
Given an array nums of 0s and 1s and an integer k, return True if all 1’s are at least k places away from each other, otherwise return False. …
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 …
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 …