Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6887283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:51:59+00:00 2026-05-27T05:51:59+00:00

I load a .csv file that fill my struct typedef struct list TList; struct

  • 0

I load a .csv file that fill my struct

typedef struct list TList;
    struct list {
        int index;
        char data;
        TList* prox;
    };

How can I do a bubble sort in my list ?

I tried the follow

void bubble(TList *list, int siz) {
    int c = 0;
    int x, y, temp;

    for (x = (siz - 1); x >= 0; x--) {
        c++;
        for (y = 1; y <= x; y++) {
            c++;
            if (list->index[y - 1] > list->index[y]) {
                temp = list->index[y - 1];
                list->index[y - 1] = list->index[y];
                list->index[y] = temp;
            }
        }
    }
    printf("\nNeeded Steps: %i\n", c);
}

I think this is because the list->index[y]. It’s like a table in a database… at position 0 (index), I have the data, and the pointer to the next node. With list->index[..] I want to pass the position and get that node, like an array. It is a linked-list and prox needs to point to the next node. I filled my list with the data that came from a .csv file, and the list->prox points to the next node.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:51:59+00:00Added an answer on May 27, 2026 at 5:51 am

    STL provides nice built-in sort algorithm. check http://www.cplusplus.com/reference/algorithm/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a CSV of file of data that I can load in R
How can I load a CSV file into a System.Data.DataTable , creating the datatable
I'm trying to load data from an external csv file that needs to be
I am trying to load a csv file that has 14 columns like this:
I've got a CSV file that contains multiple data chunkds: Alice Age,Weight,Height 20y,50kg,170cm Bob
In order to load data (from a CSV file) into an Oracle database, I
I'm trying to load data from a CSV file into a MySQL database, and
I am making a site that consumes a csv file this file can come
I want to load a CSV file that looks like this: Acct. No.,1-15 Days,16-30
I have a CSV file containing data. I want to load it into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.