Decimal Digits in Order
Updated
Problem statement
Return the decimal digits of value from most significant to least significant. Ignore a negative sign. The value zero has the single digit 0.
Function
decimalDigits(value: long) → int[]Examples
Example 1
value = 0return = [0]The decimal magnitude directly determines the ordered digit sequence.
Example 2
value = 7return = [7]The decimal magnitude directly determines the ordered digit sequence.
Example 3
value = 42return = [4,2]The decimal magnitude directly determines the ordered digit sequence.
Constraints
-10^18 <= value <= 10^18.
Source note: Author-written prompt excerpt retained for source fidelity.
More ZoomInfo Phone Screen questions
Similar questions at other companies
- Subtract Two Large Number StringsStackAdapt · PHONE SCREENStackAdapt interview questions
- Transaction Fee Calculator — Parts 1–2: Basic Fee Calculation and Conditional Fee RulesStripe · PHONE SCREENStripe interview questions
- Fair Coin from a Biased CoinAnthropic · PHONE SCREENAnthropic interview questions
- Stack Formula InterpreterTypeSafe AI · PHONE SCREEN
- Roman to IntegerKotak Mahindra Bank · PHONE SCREEN · ONSITE INTERVIEWKotak Mahindra Bank interview questions
- Minimum Difference Between Two Clock TimesMicron Technology · PHONE SCREEN
- Add Two Integers Given as StringsJane Street · PHONE SCREENJane Street interview questions
- Fizz and Buzz Words From 1 to nDocuSign · PHONE SCREENDocuSign interview questions
- Integer to String Without Built-insHudson River Trading · PHONE SCREENHudson River Trading interview questions
- Excel Sheet Column TitleUiPath · PHONE SCREEN