pydatastructs icon indicating copy to clipboard operation
pydatastructs copied to clipboard

feat: add longest alternating subsequence

Open FamALouiz opened this issue 9 months ago • 1 comments

References to issue

Resolves #317

Brief description of what was implemented

  • Added longest alternating subsequence
  • Added longest alternating subsequence tests

Comments

The algorithm works in O(n) using a dp + greedy solution. It does not return the actualy subsequence; instead, it returns only the length.

FamALouiz avatar Mar 10 '25 21:03 FamALouiz

@czgdp1807 Could you please review this? Changes have been made.

FamALouiz avatar Mar 14 '25 16:03 FamALouiz