Skip to content

Instantly share code, notes, and snippets.

View JeffersonCarvalh0's full-sized avatar

Jefferson Carvalho JeffersonCarvalh0

View GitHub Profile
def merge( A, B ):
if empty( A ):
return B
if empty( B ):
return A
if A[ 0 ] < B[ 0 ]:
return concat( A[ 0 ], merge( A[ 1...A_n ], B ) )
else:
return concat( B[ 0 ], merge( A, B[ 1...B_n ] ) )