December 2005 Entries

PlayCards Problem in Google Code Jam China

Problem Statement You are playing a card game, and in your hand, you are holding several cards. Each card has a suit, 'S', 'H', 'D', or 'C', and a value between 1 and 10, inclusive. You may play cards as part of a set, which is three or more cards of the same value, or as part of a run, which is three or more cards of the same suit, in sequential order. (Runs may not wrap, thus, 9-10-1 is not a valid run.) Each card may be played only once. For example, "1 S", "1 H" and "1...

The problem of using ArrayList

What is the value of j? 5 or 6

Not all codes have return value

It is not allowed to write code like this. Why??? static int Main(string[] args) { int a,b; if(a>b) return 1; if(a<b) return -1; if(a==b) return 0; }

Get All Hrefs Using C# in ASP.net

First i use regular expression which is in MSDN Library examples: But the Regex does not working satisfactorily somehow, where there is some blanks. Consider these hrefs: <a href="link" >EX</a> < a href = link >EX</a> I wrote the code like this. Firstly, find the 'href' tag which means that here is a href. <a href="link" >EX</a> Use SubString to get the string from 'href' to '>'. <a href="link" >EX</a> And replace href=...

«December»
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567