473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Array.Sort

What sorting-algorithm is Array.Sort based upon? Is it an effective way of
sorting an array?

Regards,
Stefan
Nov 20 '05 #1
4 6128
It uses the QuickSort algorithm. It's one of the most efficient algorithms
for sorting a list.
"Stefan" <st******@student.uu.se> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
What sorting-algorithm is Array.Sort based upon? Is it an effective way of
sorting an array?

Regards,
Stefan

Nov 20 '05 #2
Hello,

"Stefan" <st******@student.uu.se> schrieb:
What sorting-algorithm is Array.Sort based upon?
Quicksort.
Is it an effective way of sorting an array?


O(n ld n) operations when sorting n elements.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3

Stefan,

Array.Sort() is using a quicksort as the sorting algorithm.

Thanks! Robert Gruen
Microsoft, VB.NET

This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
| From: "Stefan" <st******@student.uu.se>
| Subject: Array.Sort
| Date: Thu, 11 Sep 2003 20:14:05 +0200
| Lines: 7
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <en**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: regulus3.student.uu.se 130.238.5.5
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:136753
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| What sorting-algorithm is Array.Sort based upon? Is it an effective way of
| sorting an array?
|
| Regards,
| Stefan
|
|
|

Nov 20 '05 #4
For more information on the quicksort check out:
http://www.nist.gov/dads/HTML/quicksort.html.

Thanks! Robert Gruen
Microsoft, VB.NET

This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
| From: "Stefan" <st******@student.uu.se>
| Subject: Array.Sort
| Date: Thu, 11 Sep 2003 20:14:05 +0200
| Lines: 7
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <en**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: regulus3.student.uu.se 130.238.5.5
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:136753
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| What sorting-algorithm is Array.Sort based upon? Is it an effective way of
| sorting an array?
|
| Regards,
| Stefan
|
|
|

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: lawrence | last post by:
Is there an easy way to sort a 2 dimensional array alphabetically by the second field in each row? Also, when I use sort() on a two dimensional array, it seems to work a lot like...
4
by: its me | last post by:
Let's say I have a class of people... Public Class People Public Sex as String Public Age as int Public Name as string end class And I declare an array of this class...
7
by: Federico G. Babelis | last post by:
Hi All: I have this line of code, but the syntax check in VB.NET 2003 and also in VB.NET 2005 Beta 2 shows as unknown: Dim local4 As Byte Fixed(local4 = AddressOf dest(offset)) ...
7
by: ritchie | last post by:
Hi all, I am new to this group and I have question that you may be able to help me with. I am trying to learn C but am currently stuck on this. First of all, I have a function for each sort...
3
by: ritchie | last post by:
Hi all! Still working on this program! Just to recap, I am writing a program to sort an array with four different sort algorythms. I am having a little trouble at the moment though! Now, I...
5
by: ritchie | last post by:
Hi, I am writing to ask if anyone can see why my array is not being sorted correctly? It's an array of 4 elements(ints 1,2,3,4) but after calling the selection sort it comes back sorted as...
6
by: CodeRazor | last post by:
My array is int list = new int{20,99,6}; Using a for-loop, how can I order the output of this array. I don't want to use a sorted list. I know this is straightforward but can't figure it...
21
by: yeti349 | last post by:
Hi, I'm using the following code to retrieve data from an xml file and populate a javascript array. The data is then displayed in html table form. I would like to then be able to sort by each...
5
by: Jan Smith | last post by:
I've searched the overloads for the Array.Sort method, and I haven't found a clear answer to my question. Maybe it's not in Array.Sort. Here's the question: I initialize an array X with the...
24
by: Michael | last post by:
Hi, I am trying to pass a function an array of strings, but I am having trouble getting the indexing to index the strings rather than the individual characters of one of the strings. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.