CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: kristyy_mariee

Search: Search took 0.02 seconds.

  1. Re: Need help writing a bubble sort with no loops

    Check if swapped is true.
    Yes -> start bubble sort at the beginning again
    set isSwapped to false
    call bubblesort starting at item 0.
    No -> Just...
  2. Re: Need help writing a bubble sort with no loops

    I had to include a file as its what my assignment is asking for... I changed my variables to yours and made some changes to the code but its still outputting bogus numbers, do i still need more code?...
  3. Re: Need help writing a bubble sort with no loops

    Ok i only just saw the last two replies I did this today its a bit off but i tried.
    Ok this is what ive done so far..


    #include <iostream>
    using namespace::std;


    int bubblesort( int...
  4. Re: Need help writing a bubble sort with no loops

    I know there needs to be a part where values[i] is compared to values[i-1] i jus dont kno where to place this condition... and also what i need to take out..
  5. Re: Need help writing a bubble sort with no loops

    I have a recursive selection sort, so im thinking i can make this code into a bubble sort, I'm not exactly sure what i should change or what the REAL difference is in the coding for the 2 types of...
  6. Re: Need help writing a bubble sort with no loops

    Ok ive tried, bare with me if theyre any stupid errors


    #include<stdio.h>
    #include<conio.h>
    #include<iostream.h>

    void function(int a[],int n.length, int i){

    ...
  7. Re: Need help writing a bubble sort with no loops

    #include <iostream>

    using namespace std;

    void MyFunction(int a)
    {

    cout << "i = " << a << "\n";
    if(a < 2)
    {
  8. Re: Need help writing a bubble sort with no loops

    Its some homework I have to do.. I have googled recursion and tried finding bubble sorts using it but i cant find any that dont have loops or that work so ive come here..
  9. Re: Need help writing a bubble sort with no loops

    its jus what ive been asked to do.. Ive gotten suggestions about recursion but im still a bit lost as to how id implement it with the whole base case condition etc etc
  10. Need help writing a bubble sort with no loops

    Ive written a long program that should be a bubble sort , unfortunately I cant use loops ...is there any way i can shorten this and make it indeed a bubble sort? Its sorting atm but its not entirely...
Results 1 to 10 of 11





Click Here to Expand Forum to Full Width

Featured