/** Two pointers are created to track the maximal elements in both o and MaxNArray. * The smallest element is added into tempArrayList * Consider the sizes of o and MaxNArray may be different. */ public boolean merge(State o) { if (o != null) { state.n = o.n; state.a = sortedMerge(o.a, state.a, getAscending(), o.n); } return true; }
/** Two pointers are created to track the maximal elements in both o and MaxNArray. * The smallest element is added into tempArrayList * Consider the sizes of o and MaxNArray may be different. */ public boolean merge(State o) { if (o != null) { state.n = o.n; state.a = sortedMerge(o.a, state.a, getAscending(), o.n); } return true; }
/** Two pointers are created to track the maximal elements in both o and MaxNArray. * The smallest element is added into tempArrayList * Consider the sizes of o and MaxNArray may be different. */ public boolean merge(State o) { if (o != null) { state.n = o.n; state.a = sortedMerge(o.a, state.a, getAscending(), o.n); } return true; }
/** Two pointers are created to track the maximal elements in both o and MaxNArray. * The smallest element is added into tempArrayList * Consider the sizes of o and MaxNArray may be different. */ public boolean merge(State o) { if (o != null) { state.n = o.n; state.a = sortedMerge(o.a, state.a, getAscending(), o.n); } return true; }
/** Two pointers are created to track the maximal elements in both o and MaxNArray. * The smallest element is added into tempArrayList * Consider the sizes of o and MaxNArray may be different. */ public boolean merge(State o) { if (o != null) { state.n = o.n; state.a = sortedMerge(o.a, state.a, getAscending(), o.n); } return true; }