Category: c / c++
Given two numbers, hour and minutes. Return the smaller angle (in sexagesimal units) formed between the hour and the minute hand. Example 1: Input: hour = 12, minutes = …
Given a non-negative integer num, return the number of steps to reduce it to zero. If the current number is even, you have to divide it by 2, otherwise, …
In C++, we use set, multiset, unordered_multiset, unordered_set to store a hash set. C++ set/multiset implements a Red-Black tree that maintains the order of the elements. On the other …
Given an integer n, your task is to count how many strings of length n can be formed under the following rules: Each character is a lower case vowel …
Given a palindromic string palindrome, replace exactly one character by any lowercase English letter so that the string becomes the lexicographically smallest possible string that isn’t a palindrome. After …