Royhwa
About .Net programing and other userfull skills
posts - 15, comments - 41, trackbacks - 27
<< Not all codes have return value
|
Home
|
PlayCards Problem in Google Code Jam China >>
The problem of using ArrayList
What is the value of j?
5
or
6
?
posted @ Thursday, December 22, 2005 2:45 PM
Print
Comments on this entry:
#
re: The problem of using ArrayList
Left by
Adam
at 12/22/2005 9:50 PM
The way you have the code written, the value of j is 1.
Did you mean int j = single.Count; ?
If so, the value would be 5, since ArrayList is a reference type and is behaving exactly as expected. If you don't want the same reference object copied around, you shouldn't be using its reference and should instead be cloning/copying it.
#
re: The problem of using ArrayList
Left by
Greg Young
at 12/23/2005 10:44 PM
intresting feedback worked without the link
Your comment:
Title:
Name:
Email:
(will not be displayed)
Website:
Comment:
Remember Me?
Please add 4 and 3 and type the answer here:
Live Comment Preview:
«
November
»
Sun
Mon
Tue
Wed
Thu
Fri
Sat
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
About
Contact
Login
Archives
January, 2006 (2)
December, 2005 (4)
November, 2005 (1)
October, 2005 (2)
July, 2005 (2)
June, 2005 (1)
May, 2005 (3)
Post Categories
.Net
Operating system
My Works
None Tech
Syndication:
RSS
ATOM