Tap here to switch tabs
Problem
Submissions

Problem: Form Smallest Number From Two Digit Arrays

Form Smallest Number From Two Digit Arrays gives two arrays of unique digits. Return the smallest number containing at least one digit from each array, using digits from either array as needed.

Statement

Given two arrays of unique digits nums1 and nums2, return the smallest number that contains at least one digit from each array.

Constraints:

  • 1≤1 \leq nums1.length, nums2.length ≤9\leq 9

  • 1≤1 \leq nums1[i], nums2[i] ≤9\leq 9

  • All digits in each array are unique.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Form Smallest Number From Two Digit Arrays

Form Smallest Number From Two Digit Arrays gives two arrays of unique digits. Return the smallest number containing at least one digit from each array, using digits from either array as needed.

Statement

Given two arrays of unique digits nums1 and nums2, return the smallest number that contains at least one digit from each array.

Constraints:

  • 1≤1 \leq nums1.length, nums2.length ≤9\leq 9

  • 1≤1 \leq nums1[i], nums2[i] ≤9\leq 9

  • All digits in each array are unique.