Changes between Version 1 and Version 2 of Ticket #31451, comment 28
- Timestamp:
- Jul 23, 2022, 2:45:38 PM (6 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31451, comment 28
v1 v2 9 9 }}} 10 10 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. 11 You 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. 14 12 {{{ 15 13 def longest_increasing_subsequences(self): … … 26 24 columns = [] 27 25 D = DiGraph(n+2) 28 for i, x in enumerate(self):26 for x in self: 29 27 j = bisect(first_row_p_tableau, x) 30 28 if j == len(first_row_p_tableau):