Post Reply 
HHC 2016 RPL Programming Contest
09-19-2016, 11:43 PM
Post: #16
RE: HHC 2016 RPL Programming Contest
I initialized the distance to zero, then with a FOR-NEXT loop, get the distance from each letter to it's first appearance in the string (using the SUB command and POS command) and then use MAX to keep the maximum distance.

«
0 1 PICK3 SIZE
FOR j
j PICK3 DUP j j SUB POS - MAX
NEXT NIP
»
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HHC 2016 RPL Programming Contest - Gene - 09-17-2016, 01:39 PM
RE: HHC 2016 RPL Programming Contest - Juan14 - 09-19-2016 11:43 PM



User(s) browsing this thread: 1 Guest(s)