Your question is Dynamic Programming Solution. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Cohere Health needs to compare tokenized clinical information from two authorization workflows. Given two sequences of tokens, return their longest common subsequence, preserving the original order but not requiring the tokens to be contiguous.
A subsequence may skip tokens, but it cannot reorder them. If multiple longest subsequences exist, return any one of them.
Implement longest_common_subsequence(tokens_a, tokens_b):
tokens_a and tokens_b.def longest_common_subsequence(tokens_a, tokens_b):