You are given two arrays of positive integers, arr1 and arr2.
A prefix of a positive integer is an integer formed by one or more of its digits, starting from the leftmost digit. For example,
A common prefix of two integers
You need to find the length of the longest common prefix between all pairs of integers (x, y) such that x belongs to arr1 and y belongs to arr2.
Return the length of the longest common prefix among all such pairs. If no common prefix exists, return
Note: Common prefixes between elements within the same array do not count.
Constraints:
arr1.length, arr2.length
arr1[i], arr2[i]
You are given two arrays of positive integers, arr1 and arr2.
A prefix of a positive integer is an integer formed by one or more of its digits, starting from the leftmost digit. For example,
A common prefix of two integers
You need to find the length of the longest common prefix between all pairs of integers (x, y) such that x belongs to arr1 and y belongs to arr2.
Return the length of the longest common prefix among all such pairs. If no common prefix exists, return
Note: Common prefixes between elements within the same array do not count.
Constraints:
arr1.length, arr2.length
arr1[i], arr2[i]