3536. Maximum Product of Two Digits
You are given a positive integer n. Return the maximum product of any two digits in n. Note: You may use the same digit twice if it appears more than once in n. Example 1: Input: n = 31 Output: 3 Explanation: - The digits of n are [3, 1]. - The possible products of any two digits are: 3 * 1 = 3. - The maximum product is 3. Example 2: Input: n = 22 Output: 4 Explanation: - The digit
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start