From: Will <willmann817@gmail.com>
Subject: Re: Can I convert a string of letters into an array?
Date: Mon, 5 Mar 2012 19:13:06 -0800 (PST)
Date: 2012-03-05T19:13:06-08:00 [thread overview]
Message-ID: <9204342.4227.1331003586295.JavaMail.geo-discussion-forums@vbux23> (raw)
In-Reply-To: <9891847.4305.1330998375979.JavaMail.geo-discussion-forums@vbai14>
On Monday, March 5, 2012 8:46:15 PM UTC-5, Will wrote:
> Hey There,
>
> How do I convert a string of letters into an array? I am not sure how to sort the letters in the form of a string but I know how to do it using an array. Then how do I convert that array back to a string after I am done sorting it?
>
> Thanks a bunch,
>
> Will
Here is the problem, "Write a procedure that takes in a string of 'B' and 'G' characters. The procedure should rearrange the letters into an alternating 'B'-'G' pattern that continues until the less numerous letter runs out. Assume the string only contains 'B's and 'G's; that the patter you create always starts with a 'B'; and that the string will always contain at least 1 of each letter. For example: "BBBBGGGBG" becomes "BGBGBGBGB", and "GGBG" becomes "BGGG"."
next prev parent reply other threads:[~2012-03-06 3:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 1:46 Can I convert a string of letters into an array? Will
2012-03-06 2:22 ` Shark8
2012-03-06 2:58 ` Jeffrey Carter
2012-03-06 3:10 ` Will
2012-03-06 4:51 ` John B. Matthews
2012-03-06 5:00 ` John B. Matthews
2012-03-06 6:29 ` Jeffrey Carter
2012-03-06 7:51 ` anon
2012-03-08 9:48 ` tonyg
2012-03-08 11:30 ` Simon Wright
2012-03-08 13:06 ` mockturtle
2012-03-08 14:04 ` Simon Wright
2012-03-06 3:13 ` Will [this message]
2012-03-06 8:29 ` Ludovic Brenta
[not found] ` <zLednfMxUtyBtsvSnZ2dnUVZ_oSdnZ2d@earthlink.com>
2012-03-07 10:39 ` Jacob Sparre Andersen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox