bardown91's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
7 (0.02 per day)
Joined:
20-February 12
Profile Views:
101
Last Active:
User is offline Feb 28 2012 12:28 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   bardown91 has not set their status

Posts I've Made

  1. In Topic: Selection sort Algorithm

    Posted 28 Feb 2012

    Thank you for your responses r.stiltskin. !
  2. In Topic: Selection sort Algorithm

    Posted 21 Feb 2012

      for(int i = 0; b > 56 ; i++) {
    for(int b=i ; b> 56; i++){
    }swap lowest into arr[i] }
    
    


    any better? not sure if b is the right variable to call, or if i even assign letters to numbers.
  3. In Topic: Selection sort Algorithm

    Posted 20 Feb 2012

    Ok so as I understand I must find my largest number so far before I start sorting.

    while(i < SIZE) {
    		if(largestSoFar < values[i]) {
    			largestSoFar = values[i];
    			location = i;
    		}
    		i = i + 1;
    	}
    	cout << "The largest element was " << largestSoFar << " and was in location " << location << ".\n";
    
    


    but then how do i exchange the largest value found with the value at the end and repeat the process without having to code a separate line for each sort? and then from there do I assign letters as my temporary variables??
  4. In Topic: Selection sort Algorithm

    Posted 20 Feb 2012

    thank you for the timely responses, I may be just confusing basics here...



    I believe my for statement should look something like this, But I am Having troubles with my While statement. any help>

      for(int i = 0 ; i < 20; i++) {
    for (int j = i ; j < 20 ; j++) { 
    }
    swap lowest into arr[i] 
    }
    
    
  5. In Topic: Selection sort Algorithm

    Posted 20 Feb 2012

    right, I get the basic concept of sort selection. Moving the unsorted subsection left and sorted subsection right until numbers are numerically arranged. But what I don't understand is how to set the marker for the unsorted section at the end of the list, and how to move the marker as numbers are sorted. I realize the "end" is inside the array as opposed to SIZE but Im trying to swap the end with the largest value but i have no idea how to call a temporary variable or the best way to find the largest number on my list.

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

bardown91 hasn't added any friends yet.

Comments

bardown91 has no profile comments yet. Why not say hello?