less than 1 minute read

SubsequencePermalink

Definition: Let xn be a sequence in a set S. Let nr be a strictly increasing sequence of indices in N. Then the composition xnr is called a subsequence of xn.

  • E.g., the prime numbers P are a subsequence of the natural numbers N.

描述性的定义:a subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements.

  • E.g., A,C could be a subsequence of A,B,C, but not a subarray

SubarrayPermalink

A subarray is a contiguous/consecutive subsequence of an array.

By contiguous/consecutive, 我觉得它的意思是 sequence of indices nr is a sequence of consecutive integers m,m+1,m+2,

SubstringPermalink

A substring is exactly the same thing as a subarray but in the context of strings.

Categories:

Updated:

Comments