Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • \$\begingroup\$ Nice job! You got the intended solution :) \$\endgroup\$ Commented Mar 10, 2017 at 21:11
  • \$\begingroup\$ @Emigna thanks! I wouldn't have gotten it if it weren't for the other solutions on here (yours included) that let me realize that the global array will print if the stack is empty! If it weren't for that I'd never have figured it out; I kept trying to do tricks that ended with ) thinking it'd be the only way to get the correct result on the stack. \$\endgroup\$ Commented Mar 10, 2017 at 23:03
  • \$\begingroup\$ Yeah it's pretty impossible to do with ) when you can only use 2 non-alphanumeric characters. The tricky part here was meant to be structuring the program to only use 2 wildcards and have them sequential. Would likely have been a bit harder without the other solutions but there should have been some puzzling involved :) \$\endgroup\$ Commented Mar 11, 2017 at 8:53
  • \$\begingroup\$ @Emigna What I want to know is if ^\w*..$ is possible. \$\endgroup\$ Commented Mar 14, 2017 at 16:55
  • \$\begingroup\$ @mbomb007: I don't think so. With this tactic you'd need to save the result of the addition for the next iteration and you can't use the stack for this meaning that one of UV need to come after . I can't think of another way to do it with only 2 wildcards at the end either. It can be done with 3 wildcards though. \$\endgroup\$ Commented Mar 14, 2017 at 17:03