1 数组合并排序
1.1 合并两个已排序好的数组
需要额外的存储空间用来存储合并结果
/*
* merge two array which are already sorted
* <control input>
* normal input:a!==null && b!==null
* special input:
* 1)a==null && b==null
* 2)a==null && b!=null or a!=null && b==null
* <logic>
* 0) base case:one of array is empty
* 1)how to remember where the array go:
* need aIndex,bIndex,resultIndex point to a,b,result
* 2)steps
* step1: c......
阅读全文