Tap here to switch tabs
Problem
Submissions

Problem: Form Smallest Number From Two Digit Arrays

med
30 min
Try to solve the Form Smallest Number From Two Digit Arrays problem.

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

med
30 min
Try to solve the Form Smallest Number From Two Digit Arrays problem.

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.