mardi 27 janvier 2015

How to count the consecutive characters in a string

I dont have any idea on what to do. Here is the scenario. I need to count how many deletions to make so that the string dont have any consecutive characters in it. For example


AAABBBCCC = 6 deletions. 2 on c, 2 on b, and 2 on a to make it no consecutive.


Thanks for any help. Im am writing in VB.Net.


Aucun commentaire:

Enregistrer un commentaire