Re: [algogeeks] CAN ANYBODY HELP ME ?!! WİTH THİS ALGORİTHM

2018-11-09 Thread mehmet ozturk
thank you :) Rahul Rai , 6 Kas 2018 Sal, 14:16 tarihinde şunu yazdı: > Let the glass be numbered 0 1 2 3... (2n - 1). > And the glass numbered 0 1 2 3...(n - 1) are filled. > Pick every alternating ith filled glass starting from 1 indexed glass and > swap it with the (n - 1 - i)th unfilled glass

Re: [algogeeks] CAN ANYBODY HELP ME ?!! WİTH THİS ALGORİTHM

2018-11-06 Thread Rahul Rai
Let the glass be numbered 0 1 2 3... (2n - 1). And the glass numbered 0 1 2 3...(n - 1) are filled. Pick every alternating ith filled glass starting from 1 indexed glass and swap it with the (n - 1 - i)th unfilled glass. Index 1 will swap with 2n - 2 indexed glass. Index 3 will swap with 2n - 4 i