Skip to content

[FEATURE]: Shortest Common Supersequence #1029

@ridhishjain-zepto

Description

@ridhishjain-zepto

Detailed Description

Definition: The Shortest Common Supersequence (SCS) is a string Z which is the shortest supersequence of two given strings X and Y (which may not be continuously present in Z, but order must be maintained).

example 1:
X: 'ABCXYZ', Y: 'ABZ' then Z will be 'ABCXYZ' (y is not continuous but in order)

example 2:
X: 'AGGTAB', Y: 'GXTXAYB' then Z will be 'AGGXTXAYB'

Context

Besides LCS, we need an algorithm for finding shortest common supersequence

Possible Implementation

Implementation can be done using DP lookup table method

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions