66. Plus One

66. Plus One Given a non-empty array of decimal digits representing a non-negative integer, increment one to the integer. The digits are stored such that the most significant digit is at the head of the list, and each element in the array contains a single digit. You may assume the integer does not contain any leading zero, except the number 0 itself. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Example 1: Input: digits = [1,2,3] Output: [1,2,4] Explanation: The array represents the integer 123....

<span title='2021-05-11 00:00:00 +0000 UTC'>May 11, 2021</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;volyx

1342. Number of Steps to Reduce a Number to Zero

1342. Number of Steps to Reduce a Number to Zero 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, you have to subtract 1 from it. 1 2 3 4 5 6 7 8 9 10 11 Example 1: Input: num = 14 Output: 6 Explanation: Step 1) 14 is even; divide by 2 and obtain 7....

<span title='2021-05-10 00:00:00 +0000 UTC'>May 10, 2021</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;volyx

1344. Angle Between Hands of a Clock

1344. Angle Between Hands of a Clock Given two numbers, hour and minutes. Return the smaller angle (in degrees) formed between the hour and the minute hand. 1 2 3 4 Example 1: Input: hour = 12, minutes = 30 Output: 165 1 2 3 4 Example 2: Input: hour = 3, minutes = 30 Output: 75 1 2 3 4 Example 3: Input: hour = 3, minutes = 15 Output: 7....

<span title='2021-05-10 00:00:00 +0000 UTC'>May 10, 2021</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;volyx