What is the most optimized algorithm to randomly shuffle a stack?
0 VIEWES0 LIKES0 DISLIKESSHARE
0 LIKES0 DISLIKES 0 VIEWESSHARE
given a stack (NOT AN ARRAY) with N elements, what is the most efficient algorithm to shuffle the stack randomly? i.e. given a stack of N songs like in Spotify, what is the best way to shuffle them?