Solved

i need a couple of code about MERGE SORT

Posted on 2001-06-14
3
182 Views
Last Modified: 2010-05-02
Hi,
  i need  to merge sort code for visual basic. i want to arrange in order some random numerical value by merge sort algorithm. But i can't. Please help me.  Can you write to merge sort code  for VB?
  thanks......
0
Comment
Question by:firederik
3 Comments
 
LVL 3

Accepted Solution

by:
RodStephens earned 50 total points
ID: 6190942
Take a look at:

    http://www.vb-helper.com/howto/mergsort.zip

If you just want a general sorting algorithm and it doesn't have to be mergesort, you're probably better off using some other algorithm. Quicksort is usually faster. For an example, look at:

    http://www.vb-helper.com/howto/sort.zip

Depending on how your numeric data is arranged, countingsort and other algorithms may be much faster. I don't have examples of those posted but you can find them in my book "Ready-to-Run Visual Basic Algorithms" (http://www.vb-helper.com/vba.htm).
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7136143
Hi firederik@devx,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept RodStephens's comment(s) as an answer.

firederik@devx, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7173335
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question