Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ sock_merchant.py
File
sock_merchant.py
maths/sock_merchant.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
from
collections
import
Counter
2
3
4
def
sock_merchant(colors: list[int]) -> int:
Callers
nothing calls this directly
Calls
2
sock_merchant
Function · 0.85
split
Method · 0.80
Tested by
no test coverage detected