doc.dominic
BAN USER- 0of 0 votes
AnswerDesign classes for Casino Card games. Assuming each game uses all 52 cards. Things to take into consideration: 1 to Multiple decks, shuffling and dealing.
- doc.dominic
How would you take care dealing when you are running low on available cards in a game that's not continuous shuffling?| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures
Using the replace function in stringBuilder to remove unwanted string. Loop until the result of replace is the same to ensure non-existence of the unwanted string.
- doc.dominic July 28, 2010<pre lang="c#" line="1" title="CodeMonkey27369" class="run-this">using System;
using System.Text;
public static class StringArray {
public static string removeString(string Main, string toRemove) {
StringBuilder sbMain = new StringBuilder(Main);
StringBuilder temp = new StringBuilder();
while (string.Compare(temp.ToString(), sbMain.ToString()) != 0) {
temp = new StringBuilder(sbMain.ToString());
sbMain.Replace(toRemove, "");
}
return sbMain.ToString();
}
}
public class Test
{
public static void Main()
{
Console.WriteLine(StringArray.removeString("this is a boy", "is")); Console.WriteLine(StringArray.removeString("thisiiiiiissssssssssssssssaboy", "is"));
Console.WriteLine(StringArray.removeString("thiasdl;asdfasdfasdfboy", "thiasdl"));
}
}</pre>
Preprocessing: Copy the log file into by hour file. So 24 hours a day, 7 days a week = 168 files.
Have one server acts the main server to manage servicing the file and combining the results. Have the rest of 99 server request for the next file and return the result to the main server.
Repsheenaamajors, System Administrator at Achieve Internet
Teach art classes to a diverse array of students of varying ages and abilities. Strong desire to incorporate a multidimensional ...
Be sure to take care the permutation of same numbers in a row.
e.g.
(90 , 99) : 9 + 9 = 18
(90 , 98) : 9 + 9 = 18
(90 , 97) : 9 + 9 = 18
(90 , 96) : 9 + 9 = 18
(91 , 100) : 9 + 9 = 18
(91 , 99) : 9 + 9 = 18
(91 , 98) : 9 + 9 = 18
(91 , 97) : 9 + 9 = 18
(91 , 96) : 9 + 9 = 18
(92 , 100) : 9 + 9 = 18
(92 , 99) : 9 + 9 = 18
(92 , 98) : 9 + 9 = 18
(92 , 97) : 9 + 9 = 18
(92 , 96) : 9 + 9 = 18
- doc.dominic January 22, 2014