Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/TheAlgorithms/Python
/ Stack
Class
Stack
sorts/patience_sort.py:23–28 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
21
22
@total_ordering
23
class
Stack(list):
24
def
__lt__(self, other):
25
return
self[-1] < other[-1]
26
27
def
__eq__(self, other):
28
return
self[-1] == other[-1]
29
30
31
def
patience_sort(collection: list) -> list:
Callers
1
patience_sort
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected