Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nod *function(nod * lista) {
- nod *q1, *q2, *q3= NULL, *q4= NULL;
- int m = lista->valoare;
- for (q1 = q2 = lista; q1 != NULL; q2 = q1, q1 = q1->urm) {
- if (m <= q1->valoare)
- {m = q1->valoare; q3 = q2; q4 = q1;}
- }
- if (q3 != q4) {
- q3->urm = q4->urm;
- q4->urm = lista;
- }
- return q4;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement