myMPD
Internal API documentation
Loading...
Searching...
No Matches
shuffle.h File Reference

Linked list merge shuffle implementation. More...

#include <stdbool.h>
Include dependency graph for shuffle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool list_shuffle (struct t_list *l)

Detailed Description

Linked list merge shuffle implementation.

Function Documentation

◆ list_shuffle()

bool list_shuffle ( struct t_list * l)

Shuffles the list using Fisher-Yates algorithm. Optimized for doubly-linked list: reconstructs both next and prev pointers

Parameters
llist
Returns
true on success, else false