We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
No. While 1 3 4 1 is a subsequence of 1 2 3 4 1, it's not formed by using consecutive terms, because you removed the 2 from between the 1 and the 3. Therefore, we wouldn't consider 1 3 4 1 in this challenge. If it helps at all, you can replace "consecutive" with "contiguous" (which I would argue is a more appropriate descriptor for the subsequences themselves).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Consecutive Subsequences
You are viewing a single comment's thread. Return to all comments →
No. While 1 3 4 1 is a subsequence of 1 2 3 4 1, it's not formed by using consecutive terms, because you removed the 2 from between the 1 and the 3. Therefore, we wouldn't consider 1 3 4 1 in this challenge. If it helps at all, you can replace "consecutive" with "contiguous" (which I would argue is a more appropriate descriptor for the subsequences themselves).