Programming Competition and Programming Interview questions. And maybe some web stuff, too.
Book: Cracking the Coding Interview Question: 11.1 (page 121)
You are given two sorted arrays, A and B, where A has a large enough buffer at the end to hold B. Write a method to merge B into A in sorted order.
Solution: Complexity - O(n)
No comments:
Post a Comment