Daily challenge for 2026-07-09
555. Matching Shoe Pairs
You are managing a shoe store inventory. You are given two sorted arrays of integers: left representing the sizes of left shoes in stock, and right representing the sizes of right shoes in stock.
Using a two-pointer approach, find the maximum number of matching shoe pairs you can create. A pair can only be formed if a left shoe and a right shoe have the exact same size. Each shoe can be part of at most one pair.
Example:Input: left = [1, 2, 3], right = [2, 3, 4]Output: 2
Explanation: We can pair the left shoe of size 2 with the right shoe of size 2, and the left shoe of size 3 with the right shoe of size 3.
Run this challenge interactively in Python or JavaScript when the app loads.