MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/openevolve / bubble_sort

Method bubble_sort

tests/test_api.py:231–236  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

229 import sys
230
231 def bubble_sort(arr):
232 for i in range(len(arr)):
233 for j in range(len(arr) - 1):
234 if arr[j] > arr[j + 1]:
235 arr[j], arr[j + 1] = arr[j + 1], arr[j]
236 return arr
237
238 test_cases = [([3, 1, 2], [1, 2, 3]), ([5, 2, 8], [2, 5, 8])]
239

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected