File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ class LampSort:
44 def __init__ (self , data ):
55 self .data = data
66
7+ def __copy__ (self ):
8+ return LampSort (self .data .copy ())
9+
10+ def __repr__ (self ):
11+ return 'LampSort' + (self .data .__repr__ ())
12+
713 @gtTrace
814 def sort (self ):
915 intervals = set ([range (0 , len (self .data ))])
Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ class LampSort:
55 def __init__ (self , data ):
66 self .data = data
77
8+ def __copy__ (self ):
9+ return LampSort (self .data .copy ())
10+
11+ def __repr__ (self ):
12+ return 'LampSort' + (self .data .__repr__ ())
13+
814 @gtTrace
915 def sort (self ):
1016 intervals = set ([range (0 , len (self .data ))])
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ class LampSort:
2222 def __init__ (self , data ):
2323 self .data = data
2424
25+ def __copy__ (self ):
26+ return LampSort (self .data .copy ())
27+
28+ def __repr__ (self ):
29+ return 'LampSort' + (self .data .__repr__ ())
30+
2531 @gtTrace
2632 def sort (self ):
2733 intervals = set ([range (0 , len (self .data ))])
You can’t perform that action at this time.
0 commit comments