Given two strings a and b, return the length of their longest common subsequence — the longest sequence of characters appearing in both in the same relative order (not necessarily contiguous). The input is JSON {a, b}.
Input: JSON {a, b}.
Output: Integer — the length of the longest common subsequence.
Input: {"a":"abcde","b":"ace"}
Output: 3
Explanation: 'ace' is common.Input: {"a":"abc","b":"def"}
Output: 0
Explanation: No common characters.Input: {"a":"","b":"a"}
Output: 0
Explanation: Empty string.0<=|a|,|b|<=1000