File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -26,16 +26,19 @@ def fannkuch(n: int) -> int:
2626 perm : List [int ] = list (range (n ))
2727 perm1_ins : Callable [[int , int ], None ] = perm1 .insert
2828 perm1_pop : Callable [[int ], int ] = perm1 .pop
29+ ### SHALLOW SEPARATOR ###
2930
3031 while 1 :
3132 while r != 1 :
3233 count [r - 1 ] = r
3334 r -= 1
3435
36+ ### SHALLOW SEPARATOR ###
3537 if perm1 [0 ] != 0 and perm1 [m ] != m :
3638 perm = perm1 [:]
3739 flips_count : int = 0
3840 k : int = perm [0 ]
41+ ### SHALLOW SEPARATOR ###
3942 while k :
4043 perm [: k + 1 ] = perm [k ::- 1 ]
4144 flips_count += 1
Original file line number Diff line number Diff line change @@ -22,16 +22,19 @@ def fannkuch(n):
2222 perm = list (range (n ))
2323 perm1_ins = perm1 .insert
2424 perm1_pop = perm1 .pop
25+ ### SHALLOW SEPARATOR ###
2526
2627 while 1 :
2728 while r != 1 :
2829 count [r - 1 ] = r
2930 r -= 1
3031
32+ ### SHALLOW SEPARATOR ###
3133 if perm1 [0 ] != 0 and perm1 [m ] != m :
3234 perm = perm1 [:]
3335 flips_count = 0
3436 k = perm [0 ]
37+ ### SHALLOW SEPARATOR ###
3538 while k :
3639 perm [: k + 1 ] = perm [k ::- 1 ]
3740 flips_count += 1
You can’t perform that action at this time.
0 commit comments