26. Merge two sorted lists
xs and ys are sorted in increasing order. Write merge xs ys, a sorted list containing every element of both, with repeated values kept.
Examples
- Input
merge [1, 2, 4] [1, 3, 4]Output[1, 1, 2, 3, 4, 4] - Input
merge [] [0]Output[0]
Submitting also runs 6 hidden tests.
Loading editor…
Type
\to in the editor, or click:Run checks your code against the examples and your custom inputs and records nothing. Submit also runs the hidden tests, confirms the axioms your proof uses and records the result. Each uses one compiler check.
ReadyLn 1, Col 1Lean 4
Draft saved in this browser