Introduction
In Android Studio and other IDEs there are code completions to assist efficient code insertion (especially when the names of the classes or methods are so verbose), like the one in the image below.
There are slightly different logics used between IDEs to determine what classes, m...
Hey guys.. I'm not a Python guy, but how would you golf a function to map a string of 'x' 'y' and 'z' (eg. "zzzxxyzyxyxyzyxy") to a string consisting of a number of 'a's equal to the number of 'z's in the original, then likewise for 'b's and 'y's, and then 'c's and 'z's. So "zzzxxyzyxyxyzyxy" becomes "aaaaabbbbbbccccc"
Hmmm so I'm playing around with that for fun, and I'm trying to reverse the mechanism so it's sort then translate. I tried sorted(s).translate(...) but that fails because sorted() returns a list. So I googled a bit and saw that "".join(sorted(s)) returns a string, but both "".join(sorted(s)).translate() and ("".join(sorted(s))).translate() still fail saying a string or other char buffer is required
Sort by Largest Digit(s)
code-golfintegernumbersorting
Given a list of integer, sort descending by their single largest digit(s). The order for numbers with the same largest digit are then sorted by second largest digit, etc.
We ignore duplicated digits in numbers. And if all digits in a number...
Accepted language: c++
Given q pairs of n and m long sets of numbers in a fixed order, find a length of the longest possible pair of subsets for each pair which meets rules specified below:
Either subset must have the same length
One subset must come from one set
Either subset must come from a...
I have just tried a game called Coach 2048.
(Note: You should have look to understand this question)
Since it's wasn't very exciting for me, I've been asking myself 'How much more till 2048!?'
That insired me to post a challenge because calculating this in not as easy as I thought.
Your goal:
Gi...
Manipulate letters.. not case
Task:
Given an input string, output the reverse of the string keeping the position of the case constant.
Rules:
Input and output must be in string format.
Input may contain any characters.
In case that there wasn't an alphabet on a position before but there is ...
Let's play Peg Solitaire
Tags: code-golf, array-manipulation, decision-problem
Peg solitaire is a popular game usually played alone. The game consists of some number of pegs and a board which is divided into a grid - usually the board is not rectangular but for this challenge we will assume s...
Prompted by this.
We already know which languages were created by PPCG users. Clearly language authors are inspired by each other and by existing practical languages. What are these relationships?
Looking for something like this.
50*3 rep for answers in Factorio (a non-free game)
I'll award at least 50 rep to the first 3 answers in the latest version of vanilla Factorio without using commands, custom scenarios, etc, that:
It is nontrival: either the shortest answer of all languages has at least 3 bytes, or you have use...
Prisoner's dilemma ... with three choices. Crazy, huh?
Here's our payoff matrix. Player A on the left, B on the top
A,B| C | N | D
---|---|---|---
C |3,3|4,1|0,5
N |1,4|2,2|3,2
D |5,0|2,3|1,1
The payoff matrix is engineered so that it's best for both players to always cooperate, but you ca...
Random question: according to the golfing-langs list, Lynn created GS2, but is that really accurate? (I have no idea where I got that information from o_o)
Is nooodl a completely separate user who isn't on PPCG at all?
@Mego Huh. So Lynn, nooodl, and the Mauris referred to in old comments and messages are all the same person? Maybe I should link to Lynn's GH instead of nooodl's though...
(I knew Lynn had another name they were using before, just couldn't remember what it was... Mauris sounds right!)
Anonymous
@ETHproductions Yes; however, the GS2 repository is owned by the nooodl account, so linking there may be more appropriate
Alright, I'll leave it as is, the more well-known name Lynn linking to the actual account nooodl.
Anonymous
Also just to CMA: I meant that nooodl (the GH account) belongs to Lynn - I have no idea if there is a PPCG account for nooodl, much less whether or not it belongs to Lynn.
@Adám That works too, if you wouldn't mind doing it yourself.
At some point I'd like to make the list into a full webpage, so we can fit more information on each language (codepage, language status and/or usage, etc.)
Perhaps also more info on each user, so we can avoid the Mauris/Lynn/nooodl thing for future users :-)
is there a word that means something along the lines of "a bit of incorrect or outdated information"? Somewhere between "bug" and "typo"...
@LeakyNun The only way that you could've seen a message one way then another is if it was edited, and the edit history was purged by a moderator. But we would never do that just to mess with someone, because we are 100% trustworthy and do not believe in having fun.