minus-squarehuluvutoProgramming Challenges•[Easy] Bracket Simplificationlinkfedilinkarrow-up2·1 year agoIt’s probably adding compilation time, because a system that runs my python regex in 40ms should probably run this rust program in less than 1ms linkfedilink
minus-squarehuluvutoProgramming Challenges•[Easy] Bracket Simplificationlinkfedilinkarrow-up1·1 year agodeleted by creator linkfedilink
minus-squarehuluvutoProgramming Challenges•[Easy] Bracket Simplificationlinkfedilinkarrow-up3·edit-21 year agopython 3 using regex: import re i=input() p=r'(?:\(\)|\{\}|\[\])' while re.search(p,i): i=re.sub(p,'',i) print(i) edit: made it uglier for the least characters challenge linkfedilink
It’s probably adding compilation time, because a system that runs my python regex in 40ms should probably run this rust program in less than 1ms