@QPaysTaxes I don't think there's anything like that in the regex library, you could do like for key, val in dictionary: str.replace(my_string, key, val) or something
Driftsort is a simple way to "sort" an array. It works by "sliding" or "rotating" the elements over in the array until the array is sorted, or until the array fails to be sorted.
Let's walk through two examples. First, consider the array [10, 2, 3, 4, 7]. Since the array is not sorted, we rotate...
Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000).
His C (2 <= C <= N) cows don't like this barn layout and become aggressive towards each other once put into a stall. To preven...
@CᴏɴᴏʀO'Bʀɪᴇɴ The devil (from Greek: διάβολος or diábolos = slanderer or accuser) is believed in many religions and cultures to be the personification of evil and the archenemy of humankind.
@CᴏɴᴏʀO'Bʀɪᴇɴ No, I wasn't in this case. When I picture the devil, it's a male, due to it being portrayed that way in basically everything I've ever seen/read.
So in the example, you'd start with the double X in the middle by putting O on each side. Then doing the Xes surrounding the resulting double Os. Something like that?
I like vim a lot. I've been golfing with it a lot recently. We already have clearly established that vim is a programming language, but there aren't any clear rules on how to score vim answers. The main things that I want to clarify are:
Do modifiers (shift, alt, ctrl, etc.) count as an extra k...
@Dennis Is there a way you could make the code and input boxes on Try It Online re-sizable? I hate how there's a minimum width or that I can't resize it, and that width is huge.