473,703 Members | 2,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

please need the code for Big-O-Notation of sorting algorithms

14 New Member
HI
Can anyone get me the code for the Big-O-Notation implementation of Quick sort and Bubble Sort........ple ase

(1) BUBBLE SORT

Bubble Sort Time Complexity Space Complexity
Average Case O(n2) 0
Worst Case O(n2) 0

(2) QUICK SORT

Quick Sort Time Complexity Space Complexity
Average Case O(n log n) O(n)
Worst Case O(n2) O(n)
Oct 18 '06 #1
1 3351
D_C
293 Contributor
Are you too lazy to Google it?

Quick Sort
Bubble Sort
Oct 18 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
9146
by: York | last post by:
Lets say I have the following structure struct test_struct { int some_number; char first_name } test_struct s_table
2
1512
by: Just Me | last post by:
When I print QueryPageSettings gets called a few times before PrintPage is called. I just occurred to me that the problem may be that I do AddHandler each time I print. Is that wrong? If so, is there something I can check to see if a handler has already been added?
1
1921
by: Mark Smith | last post by:
Hi, I have the capture from http stream which is chunked and gzipped. I need code to de-chunk it (i.e. decode it), and then gunzip it--just like a web browser woudl do. Could someone please help me, or point me in the right direction? thanks much
6
1398
by: Tark Siala | last post by:
hi i spend more time to write the code, like VB6, VB2005, SQL Stored Procedure code. any one know good Application to Automaticaly read Database (Access or SQL), then write VB Code and Stored Procedure (if this allication free thats good :) ) -- Tarek M. Siala
3
1155
hirak1984
by: hirak1984 | last post by:
When i am calling this class from another class only a blank frame appears,with nothing on it.I dont know where the problem is,Please help. class project extends JFrame{ public void project() { //JFrame frame=new JFrame(); jtf = new JTextField(3); jtf1 = new JTextField(15); JPanel p1 = new JPanel(); p1.add(new JLabel("SID")); p1.add(jtf); p1.add(new JLabel("User name:"));
7
2533
beacon
by: beacon | last post by:
I'm writing a program as an assignment that takes 5 sorting algorithms and and tests for the amount of time and the number of comparisons it takes to um, sort an array. I have run into some trouble though. On lines 54-59, I previously had them placed from line 46 on. This worked out great for printing just the bubble sort, but I have to get the other four sorting algorithms in here and I was hoping to print the contents out in a for loop, as...
0
1331
by: alcan-rally | last post by:
Please need Classified script with payment option I am looking for MojoScripts or delata script or 68classifieds or GeoClassifieds Thanks
7
2450
by: chris52672 | last post by:
I am trying to resize form1 aka (CipherForm) while the program is running. I have Visual Studios 2003. I have tried private void CipherForm_Load(object sender, System.EventArgs e) { CipherForm h = new CipherForm(); h.Size = new Size(500, 500);
4
2880
by: bary2000 | last post by:
hi i am writing a program in C++ to evaluate some sorting algorithms and i need to measure the hoe much memory the algorithms take to perform the sorting but i don't know if C++ have any tools or codes do this task.
0
8744
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9240
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8996
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6585
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5920
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2426
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2055
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.