| Action | Tickets Earned |
|---|---|
Complete Daily Challenge | +1 |
10-Day Streak | +10 |
20-Day Streak | +20 |
30-Day Streak | +30 |
LinkedIn post with #30DaysofCode Everyday (and tag Educative) | +2 per post |
Most-Liked Post Overall | +20 |
Top of Leaderboard | +50 |
Leaderboard: 2nd place | +30 |
Leaderboard: 3rd place | +20 |
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]
| Action | Tickets Earned |
|---|---|
Complete Daily Challenge | +1 |
10-Day Streak | +10 |
20-Day Streak | +20 |
30-Day Streak | +30 |
LinkedIn post with #30DaysofCode Everyday (and tag Educative) | +2 per post |
Most-Liked Post Overall | +20 |
Top of Leaderboard | +50 |
Leaderboard: 2nd place | +30 |
Leaderboard: 3rd place | +20 |
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]