If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Finding Singletons in a String sequence

Hi everyone,

I need help with a homework problem. I have to write a code that counts the number of singletons, stored in the variable n, in a string sequence. A singleton is a word in a sequence that does not appear before or after itself in the sequence.

I created a count variable n and initiliazed it to 2, since the first and last tokens can only have one
copy before and after each other respectively. I divided the string sequence into tokens by splitting it with respect to the empty spaces between them.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.