Data Structures & AlgorithmsModerateTCS NQT · Accenture
Problem: The product of the digits of 2^10 · 3^4 is computed (in decimal). What is that product?
- A. 2304
- B. 27
- C. 82944
- D. 576
Correct answer: A. 2304
2¹⁰ · 3⁴ = 82944, and 8 · 2 · 9 · 4 · 4 = 2304. 27 is the digit sum, 82944 is the number itself, and dropping one 4 gives 576.
More Coding Interview Problems questions
- Problem: The array [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] is reduced by repeatedly removing the first two elements and appending their sum to the…
- Problem: For the sequence 2, 3, 5, 7, 11, …, the first 10 prime numbers are listed. What is the sum of the 10th and 7th primes in the list?
- Problem: A bitmask represents a subset of the 4 items {A, B, C, D} by bits 0–3. How many subsets have an even number of items and do NOT…
- Problem: Find the number of ways to select a non-empty subset of {1, 2, 4, 8, 16} whose sum is a multiple of 5.
- Problem: In the array [3, 5, 2, 8, 6, 1], the number of elements that are greater than every element after them (right leaders) is…
- Problem: A monotone sequence is built: start with 1, and append the next number as (previous number) + (number of digits of previous…