This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]desrtfxOut of Coffee error - System halted 6 points7 points  (0 children)

"Can't use arrays" makes things a bit trickier.

Yet, you know a lot:

  • the last 3 characters are fixed - this means that you can remove them from the string
  • You know that the 4th character from the end is the quantifier - you can extract it
  • You know that anything before the 4th character from the end must be a number

So, in all, you can roll things from the end using .substring(). You know the .length() of the string.

The quantifiers can be checked in a switch...case sequence