Category: c / c++
Given a string S, return the number of substrings of length K with no repeated characters. Example 1: Input: S = “havefunonleetcode”, K = 5 Output: 6 Explanation: There …
Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level X …
You have some sticks with positive integer lengths. You can connect any two sticks of lengths X and Y into one stick by paying a cost of X + …
There is a special keyboard with all keys in a single row. Given a string keyboard of length 26 indicating the layout of the keyboard (indexed from 0 to …
Given a time represented in the format “HH:MM”, form the next closest time by reusing the current digits. There is no limit on how many times a digit can …