c++ - Reverse stack in increasing order alternately -


what elegant way (less code?) of reversing stack in increasing order in alternating manner? (non recursively)

ex.

1 2 3 4 5 6 7 8 9 10  1 [3 2] 4 5 6 [10 9 8 7] 

i use std::reverse. work you?

http://www.cplusplus.com/reference/algorithm/reverse/


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -