美文网首页
Subset vs. Subarray vs. Subseque

Subset vs. Subarray vs. Subseque

作者: yyd_6717 | 来源:发表于2018-06-09 07:08 被阅读0次

    subset: 数学上子集的概念

    subarray:连续的子集

    subsequence:可以不连续的子集

    * 子序列:某个序列的子序列是从最初序列通过去除某些元素但不破坏余下元素的相对位置(在前或在后)而形成的新序列。(from weki)

    EX: Given Array: [1, 2, 3]

    subset:            [] [1] [2] [3] [1, 2] [1, 3] [2, 3]  [1, 2, 3]

    subarray:         [] [1] [2] [3] [1, 2] [2, 3] [1, 2, 3]

    subsequence: [] [1] [2] [3] [1, 2] [1, 3] [2, 3] [1, 2, 3] 

    相关文章

      网友评论

          本文标题:Subset vs. Subarray vs. Subseque

          本文链接:https://www.haomeiwen.com/subject/lynzsftx.html