12,882,128 members (29,335 online)

# C#

 View All Threads First Prev Next
 help in solving a problem michae1108-Oct-12 6:24 michae110 8-Oct-12 6:24
 Riddle: There are eight cards divided into 4 red and to 4 black. You have to order them correctly, so that when the first card draw (no matter what color) next card must be different from the previous. Means to get a sequence of different colors. For example: Array A: Contains the colors: [b, b, b, A, A, b, A, A] (right to left). When the first card pull the other card go to the end of the fund. Then pull the other card and it should be a different card from before. That is supposed to go after the first card retrieval array like this: [a, b, b, b, a, a, b] After another array retrieval is such that [a, a, b, b, b, a] More retrieval [b, A, A, b, b] More retrieval [b, b, A, A] More Extract [a, b, b] More retrieval [b, A] More retrieval [b] More retrieval and cash cards is all over and I got a set of cards (from left to right): [b, a, b, a, b, a, b, a] 1. Written operation in C # which accepts an array, the operation returns true if the array can solve the riddle another lie. 2. Written a program that runs the operation and returns the correct number sequence. 3., And also if you can to build a computational model of the program (that I just started learn computational models) so it will make it easier for members of the forum to better understand the program. Thank
 Re: help in solving a problem Richard MacCutchan8-Oct-12 6:57 Richard MacCutchan 8-Oct-12 6:57
 Re: help in solving a problem Dave Kreskowiak8-Oct-12 11:00 Dave Kreskowiak 8-Oct-12 11:00
 Re: help in solving a problem Abhinav S8-Oct-12 17:37 Abhinav S 8-Oct-12 17:37
 Re: help in solving a problem Paul Conrad10-Oct-12 7:46 Paul Conrad 10-Oct-12 7:46
 Last Visit: 31-Dec-99 18:00     Last Update: 23-Apr-17 7:00 Refresh 1

General    News    Suggestion    Question    Bug    Answer    Joke    Praise    Rant    Admin

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Advertise | Privacy | Mobile
Web02 | 2.8.170422.1 | Last Updated 23 Apr 2017