ADVANCE DATA HANDLING CONCEPTS

It is a topic on Chapter 8 in the book Programming logic and Design, Comprehensive, 8th edition by Joyce Farrel.
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 BUBBLE SORT ALGORITHM

Go down 
Go to page : 1, 2  Next
AuthorMessage
Anna
Admin
avatar

Posts : 8
Join date : 2018-08-08
Age : 20

PostSubject: BUBBLE SORT ALGORITHM   Thu Aug 16, 2018 12:57 pm

Bubble sort

– Items in a list are compared with each other in pairs
– Items are then swapped based on which is larger or smaller
– Sometimes called a sinking sort • Ascending sorts put the smaller item on top so the largest item sinks to the bottom • Descending sorts put the larger item on top so the smallest item sinks to the bottom
– An algorithm contains instructions for swapping values



What is algorithm?

In programming, algorithm are the set of well defined instruction in sequence to solve a program. An algorithm should always have a clear stopping point.

Qualities of a good algorithm
-Inputs and outputs should be defined precisely.
- Each steps in algorithm should be clear and unambiguous.
- Algorithm should be most effective among many different ways to solve a problem.
-An algorithm shouldn't have computer code. Instead, the algorithm should be written in such a way that, it can be used in similar programming languages.




Back to top Go down
View user profile http://annabermudez.forumotion.asia
chelsey
Guru


Posts : 10
Join date : 2018-08-23

PostSubject: Re: BUBBLE SORT ALGORITHM   Thu Aug 23, 2018 12:14 pm

How did we know or what is an indicator if the variabe needed is an array or elements?
Back to top Go down
View user profile
chelsey
Guru


Posts : 10
Join date : 2018-08-23

PostSubject: Re: BUBBLE SORT ALGORITHM   Thu Aug 23, 2018 12:17 pm

Later I'll send the flow chart for me to discuss it better.
Back to top Go down
View user profile
ahnmaria
Guru


Posts : 10
Join date : 2018-08-28

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 12:28 pm

What is better to do first, algorithm or flowchart?
Back to top Go down
View user profile
ahnmaria
Guru


Posts : 10
Join date : 2018-08-28

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 12:33 pm

What is the important of making algoritms?
Back to top Go down
View user profile
ahnmaria
Guru


Posts : 10
Join date : 2018-08-28

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 12:36 pm

Do you know, what are the sorting algorithm categories?
Back to top Go down
View user profile
ahnmaria
Guru


Posts : 10
Join date : 2018-08-28

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 12:38 pm

Informally, an algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output.
Back to top Go down
View user profile
VOVOFRIEND

avatar

Posts : 5
Join date : 2018-08-28

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 1:16 pm

ahnmaria wrote:
What is better to do first, algorithm or flowchart?
For me, its better to make a flowchart first. because it will help you to know what will be the "flow" of your program.Very Happy
Back to top Go down
View user profile
Anna
Admin
avatar

Posts : 8
Join date : 2018-08-08
Age : 20

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 1:28 pm

chelsey wrote:
How did we know or what is an indicator if the variable needed is an array or elements?

You can identify the array if it is inside the square bracket [array] this is like the number or cabinet you have or a space in your cabinet where will you put your shoes and your shoes is what you called the elements which means the content is the element and the array is the one who handle your content.
Back to top Go down
View user profile http://annabermudez.forumotion.asia
Anna
Admin
avatar

Posts : 8
Join date : 2018-08-08
Age : 20

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 1:33 pm

ahnmaria wrote:
What is better to do first, algorithm or flowchart?

I chose to do first the algorithm so that you will identify better the flow of program before you do flow charting by the way there is no really a big difference between the two except that flowchart explain the flow of program in a graphical way.
Back to top Go down
View user profile http://annabermudez.forumotion.asia
Anna
Admin
avatar

Posts : 8
Join date : 2018-08-08
Age : 20

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 1:39 pm

ahnmaria wrote:
Do you know, what are the sorting algorithm categories?


There are many categories in sorting data and here are some:

1.Comparable elements
2.Bubble sort
3.Selection sort
4. Insertion sort
5. Shellsort
6. Heap sort
7. Merge Sort
8. Quick sort
9. Selection Problem
10.Decision Trees and Lower Bounds

and please search some more Very Happy
Back to top Go down
View user profile http://annabermudez.forumotion.asia
Shiela
Guru


Posts : 10
Join date : 2018-08-28

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 1:46 pm

ahnmaria wrote:
What is better to do first, algorithm or flowchart?


any of the two can be done first. Actually Flow chart is under the category of Algorithm which is a programming language
Back to top Go down
View user profile
Shiela
Guru


Posts : 10
Join date : 2018-08-28

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 1:50 pm

Anna wrote:
ahnmaria wrote:
Do you know, what are the sorting algorithm categories?


There are many categories in sorting data and here are some:

1.Comparable elements
2.Bubble sort
3.Selection sort
4. Insertion sort
5. Shellsort
6. Heap sort
7. Merge Sort
8. Quick sort
9. Selection Problem
10.Decision Trees and Lower Bounds

and please search some more  Very Happy  


11. Bucket Sort
* array of the size of maximum element + 1
*counts the number of elements of each
*useful where input is only small integers
12.
External Sorting
* Too large for main memory – skipping section
*Multiway Merge
*Polyphase Merge
*Replacement Selection

Back to top Go down
View user profile
Shiela
Guru


Posts : 10
Join date : 2018-08-28

PostSubject: Re: BUBBLE SORT ALGORITHM   Tue Aug 28, 2018 1:53 pm

chelsey wrote:
How did we know or what is an indicator if the variabe needed is an array or elements?

Its a bit confusing but an array is a data structure that sorts or handle data
Back to top Go down
View user profile
chelsey
Guru


Posts : 10
Join date : 2018-08-23

PostSubject: Re: BUBBLE SORT ALGORITHM   Thu Sep 13, 2018 12:58 pm

ahnmaria wrote:
What is better to do first, algorithm or flowchart?
it has the same importance
Back to top Go down
View user profile
ralfh
Guru


Posts : 10
Join date : 2018-10-15

PostSubject: Re: BUBBLE SORT ALGORITHM   Mon Oct 15, 2018 2:46 pm

chelsey wrote:
How did we know or what is an indicator if the variabe needed is an array or elements?
array is the cabinet or space for shoes and elements are the shoes itself. hope that helps Laughing
Back to top Go down
View user profile
camillee
Guru


Posts : 10
Join date : 2018-10-15

PostSubject: Re: BUBBLE SORT ALGORITHM   Mon Oct 15, 2018 3:29 pm

VOVOFRIEND wrote:
ahnmaria wrote:
What is better to do first, algorithm or flowchart?
For me, its better to make a flowchart first. because it will help you to know what will be the "flow" of your program.Very Happy  
I agree to that but if you are too good in imagining I think you do the algorithm first.
Back to top Go down
View user profile
camillee
Guru


Posts : 10
Join date : 2018-10-15

PostSubject: Re: BUBBLE SORT ALGORITHM   Mon Oct 15, 2018 3:30 pm

ralfh wrote:
chelsey wrote:
How did we know or what is an indicator if the variabe needed is an array or elements?
array is the cabinet or space for shoes and elements are the shoes itself. hope that helps Laughing
it is easy to understand the difference of the two just imagine a three layer cabinet and that will be your array then element is what you put there
Back to top Go down
View user profile
camillee
Guru


Posts : 10
Join date : 2018-10-15

PostSubject: Re: BUBBLE SORT ALGORITHM   Mon Oct 15, 2018 3:32 pm

Shiela wrote:
chelsey wrote:
How did we know or what is an indicator if the variabe needed is an array or elements?

Its a bit confusing but an array is a data structure that sorts or handle data
An array is a data structure that contains a group of elements. Typically these elements are all of the same data type, such as an integer or string. Arrays are commonly used in computer programs to organize data so that a related set of values can be easily sorted or searched.
Back to top Go down
View user profile
camillee
Guru


Posts : 10
Join date : 2018-10-15

PostSubject: Re: BUBBLE SORT ALGORITHM   Mon Oct 15, 2018 3:38 pm

Anna wrote:
ahnmaria wrote:
Do you know, what are the sorting algorithm categories?


There are many categories in sorting data and here are some:

1.Comparable elements
2.Bubble sort
3.Selection sort
4. Insertion sort
5. Shellsort
6. Heap sort
7. Merge Sort
8. Quick sort
9. Selection Problem
10.Decision Trees and Lower Bounds

and please search some more  Very Happy  
partioning strategy bounce
Back to top Go down
View user profile
camillee
Guru


Posts : 10
Join date : 2018-10-15

PostSubject: Re: BUBBLE SORT ALGORITHM   Mon Oct 15, 2018 3:41 pm

Shiela wrote:
chelsey wrote:
How did we know or what is an indicator if the variabe needed is an array or elements?

Its a bit confusing but an array is a data structure that sorts or handle data
yeah shiela dont be confused you got it right!
Back to top Go down
View user profile
camillee
Guru


Posts : 10
Join date : 2018-10-15

PostSubject: Re: BUBBLE SORT ALGORITHM   Mon Oct 15, 2018 3:42 pm

Shiela wrote:
ahnmaria wrote:
What is better to do first, algorithm or flowchart?


any of the two can be done first. Actually Flow chart is under the category of Algorithm which is a programming language
when you do flow chart first you can easily understand the flow of your program
Back to top Go down
View user profile
camillee
Guru


Posts : 10
Join date : 2018-10-15

PostSubject: Re: BUBBLE SORT ALGORITHM   Mon Oct 15, 2018 3:44 pm

ahnmaria wrote:
Informally, an algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output.
and that will be the main thing that youll be manipulated to create a program.
Back to top Go down
View user profile
camillee
Guru


Posts : 10
Join date : 2018-10-15

PostSubject: Re: BUBBLE SORT ALGORITHM   Mon Oct 15, 2018 3:45 pm

ralfh wrote:
chelsey wrote:
How did we know or what is an indicator if the variabe needed is an array or elements?
array is the cabinet or space for shoes and elements are the shoes itself. hope that helps Laughing
haha like the example Very Happy another is array are your house and you are the elements lol!
Back to top Go down
View user profile
Shiela
Guru


Posts : 10
Join date : 2018-08-28

PostSubject: Re: BUBBLE SORT ALGORITHM   Mon Oct 15, 2018 3:59 pm

ahnmaria wrote:
What is the important of making algoritms?
algorithm is the mind of the program.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: BUBBLE SORT ALGORITHM   

Back to top Go down
 
BUBBLE SORT ALGORITHM
Back to top 
Page 1 of 2Go to page : 1, 2  Next
 Similar topics
-
» Bubble gum item
» *SPOILERS* 2012 Sub Exclusive and More named!!
» the mystery of bubbles quest
» Elo Stat pgn not working
» The Bubble Trap

Permissions in this forum:You cannot reply to topics in this forum
ADVANCE DATA HANDLING CONCEPTS :: Algorithm-
Jump to: