Questions about linked list

Can you pass a linked list through a function?
so let's say i already created my linked list..i have the values all linked together. Can i pass my entire linked list through a function, just as i would any struct?
Also Once i have created my linked list can i do a sort(i.e bubble sort) or is that bad idea?

1
2
3
4
  struct node1{
int numb;
node1*next;
};
Last edited on
> Can i pass my entire linked list through a function, just as i would any struct?
¿why would there be any difference with a linked list?

> can i do a sort(i.e bubble sort) or is that bad idea?
i.e. means in other words
e.g. means by instance
There are a lot of sorting algorithms, I can't come up with a situation where bubble sort would be preferred.

For sorting a list use merge sort.
we have to use bubble sort, for the project
Topic archived. No new replies allowed.