Purchase Solution

Merging Arrays in VB.NET

Not what you're looking for?

Ask Custom Question

Merging is the process of combining two sorted lists into a single sorted list. In some cases, one list can be appended to the other, and the new list then can be sorted. Merging using this method, however, is not always the most efficient.

Write a program that merges two arrays, intX and intY, into intZ. Assume that the arrays intX and intY have been presorted and are in ascending sequence. Declare the array intX to have 15 elements, the array intY to have 13 elements, and the array intZ to have 28 elements. Display the contents of the array intZ in a TextBox control that has its MultiLine property set to True. Do not use any array methods in your code. (Hint: Be sure to take into consideration that the two arrays are not the same size. That is, when the shorter of the two arrays has been processed, assign the remaining elements of the longer array to the array intZ). Use the following sample data for the two initial arrays:

Array intX, 15 elements 4,9,12,15,22,33,44,66,72,84,87,92,96,98,99
Array intY, 13 elements 6,8,12,16,24,31,68,71,73,74,81,93,94

Purchase this Solution

Purchase this Solution


Free BrainMass Quizzes
Basic Networking Questions

This quiz consists of some basic networking questions.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Javscript Basics

Quiz on basics of javascript programming language.

C++ Operators

This quiz tests a student's knowledge about C++ operators.