I am recently writing a doubly link list by C++
However,I don't know how to perform shuffle as the following:
Places all the nodes in odds positions before that in even ones.
For example,after executing shuffle, the list {a, b, c, d, e} will become {a, c, e, b, d}
Can anyone help me to write a function for this?
Thanks every brother!!:)