package com.zyt.interview;
public class MergeSortArray {
public static int[] sort(int[] a,int[] b){
//a,b数组必须有序
int merge[]=new int[a.length+b.length];
int lenA=0,lenB=0,lenMer=0;
while(lenA<a.length&&lenB<b.length){
if(a[lenA]<b[lenB]){
mer
合并两个有序数组(归并排序)
最新推荐文章于 2024-05-16 09:00:00 发布