Can someone explain a bubble sort in Krn script to me?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Can someone explain a bubble sort in Krn script to me?
# 1  
Old 03-01-2008
Can someone explain a bubble sort in Krn script to me?

See topic.

I need to understand how it works before i start to work on a program anyone have any resources or the time to explain it thanks.
# 2  
Old 03-01-2008
Hi.

See explanation, code, diagram, comparisons, references at Bubble sort - Wikipedia, the free encyclopedia

Google and Wikipedia are your friends ... cheers, drl
# 3  
Old 03-01-2008
Bubble sort - Wikipedia, the free encyclopedia

(just noticed it was already posted Smilie)
# 4  
Old 03-01-2008
thanks Ill try to make sense of that. I know that google is my friend its just sometimes its difficult to find exactly what I want.
# 5  
Old 03-02-2008
This has to be homework - nobody would ever write a program requirement like that.
We really don't want homework on the fourms.
# 6  
Old 03-02-2008
Quote:
Originally Posted by jim mcnamara
This has to be homework - nobody would ever write a program requirement like that.
We really don't want homework on the fourms.
But I really can't see an instructor wanting students to write a bubble sort. An instructor would know better. A requirement like this coming from a non-tech manager seems more plausable.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Perl: Can someone please explain this code "sort { $a <=> $b } @unsorted"

@sorted = sort { $a <=> $b } @unsorted; I am having hard time understanding how this works? I know the output but interested to know the working. Thanks in advance. (2 Replies)
Discussion started by: Tanu
2 Replies

2. UNIX for Advanced & Expert Users

Script to sort the files and append the extension .sort to the sorted version of the file

Hello all - I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies

3. Programming

C++ bubble sort.

In regards to the for loop with '&& flag' I think I see the intended logic. If there was a transaction keep looping until the end of the array otherwise exit. Well it compiles but it does not work as I see the logic. I really like this routine much better than any others I have seen and would like... (4 Replies)
Discussion started by: sepoto
4 Replies

4. Shell Programming and Scripting

Can you please explain what this script does?

I am trying to figure out what this script does. Can someone help? delt_file=`diff /transfer/adx/tey_header.txt /transfer/adx/tey_header_yesterdy.txt` if ] ; then touch /transfer/adx/lrstb028_ctl2.ctl else if test -f "/transfer/adx/lrstb028_ctl2_2.ctl" ; then touch... (1 Reply)
Discussion started by: chamajid
1 Replies

5. Shell Programming and Scripting

Can help me explain this script?

Hi expert Can help me explain this script? myFile="./File" myCell="" while do read myCell || break echo "" echo "***************************" echo "$myCell" echo "***************************" done < $myFile this is ksh. Can help me... (1 Reply)
Discussion started by: vincyoxy
1 Replies

6. Shell Programming and Scripting

need some explain about this script

Dear Member, i need help in this script filename_DD_MM_YYYY_HHMMSS.log this is the log file format i need to split this name to three variables 1 variables contain filename 2 variables contain _DD_MM_YYY_ 3 variables contains HHMMSS ... (7 Replies)
Discussion started by: dellsh
7 Replies

7. What is on Your Mind?

Cool YouTube Video: Here Comes Another Bubble - The Richter Scales!

You will like this :) fi4fzvQ6I-o (2 Replies)
Discussion started by: Neo
2 Replies

8. Shell Programming and Scripting

explain me this shell script ...

currentSid=${TWO_TASK:-$ORACLE_SID} echo $currentSid this script returns value of ORACLE_SID but what i am not getting is what is ":-" doing ?? (1 Reply)
Discussion started by: zedex
1 Replies

9. Shell Programming and Scripting

need help to explain script

dear all, can anyone help me to explain all the commands in the .profile bourne shell below ? really appreciate ur help. PLEASE. 1 2 # @(#) $Revision: 72.2 $ 3 4 # Default user .profile file (/usr/bin/sh initialization). 5 6 # Set up the terminal: 7 if 8 then 9 eval ` tset -s -Q -m... (1 Reply)
Discussion started by: ykchua
1 Replies
Login or Register to Ask a Question