I need to reverse odd number in a list and even number in another list, I have give input as 1,2,3,4,5, and so on can any one please suggest me an efficient way to do this?
Loading
I need to reverse odd number in a list and even number in another list, I have give input as 1,2,3,4,5, and so on can any one please suggest me an efficient way to do this?
Know the answer? Post it. Somebody with the same question will find it here.
Selva GanapathyRank #560 · 4.3K reputationPosted Sep 24, 2014, 3:30 AM EDT
Hi Jegan Priya,
http://www.c-sharpcorner.com/UploadFile/6f0898/the-circular-stack-an-advance-in-data-structure/
You can use the above structure to meet your requirement in which you can push the odd number in front stack and even number in back stack And pop up to reverse the number
Regards,
Selva Ganapathy K
VulpesRank #55 · 29.2K reputationPosted Sep 23, 2014, 7:22 AM EDT
The output is:
nathaJegamoorty Pillai84 reputationPosted Sep 23, 2014, 9:32 AM EDT
i Vulpes,
Thanks, but now need to store the numbers in a single structure that have two separate list, Please suggest me in this requirement
VulpesRank #55 · 29.2K reputationPosted Sep 23, 2014, 10:20 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts