Total members 10261 | Gratitudes |It is currently Tue May 22, 2012 5:37 pm Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Question
 Question subject: Alghrithm for Puzzle ,,,?
PostPosted: Mon Sep 20, 2010 2:07 am 
Offline
Newbie
User avatar

Joined: Mon Sep 20, 2010 1:01 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time

can you help me in this algorithm plz ..

Alternating disks you have a row of 2n disks of two colors,n dark and n light.
They alternate:dark,light,dark,light,and so on.You want to get all the dark disks to the right-hand end,and all the light disks to the left-hand end. The only moves you are allowed to make are those that interchange the positions of two neighboring disks.

Design an algorithm for solving this puzzle and determine the number of moves it takes.


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 2 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team