Solved

i need a couple of code about MERGE SORT

Posted on 2001-06-14
3
179 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now