Given two strings a and b, return the length of their longest common substring — the longest run of characters appearing contiguously in both. The input is JSON {a, b}.
Input: JSON {a, b}.
Output: Integer — the length of the longest common substring.
Input: {"a":"ABCDGH","b":"ACDGHR"}
Output: 4
Explanation: 'CDGH' is common.Input: {"a":"abc","b":"abc"}
Output: 3
Explanation: Whole string.Input: {"a":"a","b":"b"}
Output: 0
Explanation: No match.0<=|a|,|b|<=1000