Let me try to help you
/**
* get array of String and return array of int.
* it is assumed the input is valid
* @param gsp
* @return
*/
int[] stringToInteger(String[] gsp) {
int[] res = new int[gsp.length];
for(int i=0; i<gsp.length; i++) {
if(gsp[i] != null)
res[i] = Integer.parseInt(gsp[i]);
}
return res;
}
/**
* get array of int and return array of string
* @param gsp
* @return
*/
String[] integerToString1(int[] gsp) {
String[] res = new String[gsp.length];
for(int i=0; i<gsp.length; i++) {
res[i] = gsp[i] + "";
}
return res;
}
/**
* get array of int and return concatenated string
* @param gsp
* @return
*/
String integerToString2(int[] gsp) {
StringBuilder sb = new StringBuilder();
for(int i=0; i<gsp.length; i++) {
sb.append(gsp[i]);
}
return sb.toString();
}
On Sep 26, 3:38 pm, mandeep <[email protected]> wrote:
> ok....
> well it would be better if u tell me in java.....
>
> On Sun, Sep 25, 2011 at 4:34 PM, iman movahedi <[email protected]>wrote:
>
>
>
--
You received this message because you are subscribed to the Google Groups
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-code?hl=en.