Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Nov 9th, 2005, 1:03 PM   #1
allenm
Newbie
 
Join Date: Nov 2005
Posts: 3
Rep Power: 0 allenm is on a distinguished road
Exclamation Algorithm Question - Urgent Help Needed

Hello, I am presented with the following problem and have tried desperately (over 12 hours) to solve it:

I have a string say "011010101" and I want to parse this string based on a table of values:

i = 0
m = 011
k = 10
e = 101

I want to construct an algorithm that will go through the string above and parse it assigning each value to their corresponding table value. Looking at it, I know that the string would become "011" , "0" , "10" , "101" which for this example would be "mike" in that order. Since "i" is the first thing I check, my code tries to form "0", "11010101", and nothing else will get extracted. There can be more than one correct parsing and also the table of values includes all the letters (uppercase and lowercase) as well as ' ', '\n', and '\t'. Any help would be greatly appreciated.
allenm is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:17 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC