Find the longest subsequence where each next element comes later and is exactly one larger — [2,1,3,2,4,3,2,5,4,5] gives [1,2,3,4,5]. A Verily frontend assessment taken live with an interviewer.
Find the longest subsequence where each next element comes later and is exactly one larger — [2,1,3,2,4,3,2,5,4,5] gives [1,2,3,4,5]. A Verily frontend assessment taken live with an interviewer.
This question is free
Log in to read the full question, run your code and see the solution.
Be the first to discuss this question
Approaches, follow-up questions and how the interview went. Log in to read and join the discussion.