Changes between Version 1 and Version 2 of Ticket #31451, comment 28


Ignore:
Timestamp:
Jul 23, 2022, 2:45:38 PM (6 months ago)
Author:
dcoudert
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31451, comment 28

    v1 v2  
    99}}}
    1010
    11 You can also avoid the call to method `self.longest_increasing_subsequence_length` and use `enumerate` in some places.
    12 
    13 Overall this is faster than your current code.
     11You can also avoid the call to method `self.longest_increasing_subsequence_length` and ensure that both `use `first_row_p_tableau` and `columns[j]` are sorted. Overall this is faster than your current code.
    1412{{{
    1513def longest_increasing_subsequences(self):
     
    2624    columns = []
    2725    D = DiGraph(n+2)
    28     for i, x in enumerate(self):
     26    for x in self:
    2927        j = bisect(first_row_p_tableau, x)
    3028        if j == len(first_row_p_tableau):