[LeetCode 258] Add Digits [Java]
1. Description Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. 2. Example Given num = 38, t...
1. Description Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. 2. Example Given num = 38, t...
1. Description Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function shoul...
1. Description Calculates the number of 1 in a binary integer 2. Example 11111110100 -> 8 001011010 -> 4 3. Code [restabs alignment="osc-tabs...
1. Description Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of t...
1. Description Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which...
1. Description Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 2. Example input s = ...
1. Description Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 2. Example input num ...
1. Description Determine whether an integer is a palindrome. Do this without extra space. 2. Runtime Distribution 3. Submission Details 4. Exampl...
1. Description Implement atoi to convert a string to an integer. 2. Explanation The function first discards as many whitespace characters as necess...
1. Description Reverse digits of an integer. 2. Example x = 123, return 321 x = -123, return -321 3. Code [restabs alignment="osc-tabs-right"...