Questions tagged [self-scoring]

A challenge where the scoring mechanism and the task required are the same. This means that if you pass your program to itself as input it should give you its score.

Filter by
Sorted by
Tagged with
14 votes
12 answers
1k views

Count the shared substrings with 2 programs

Write 2 programs in the same language which count the number of shared subsequences of consecutive elements from 2 given sequences. For example, given ...
Fatalize's user avatar
  • 38.4k
17 votes
9 answers
1k views

Longest alternating subsequence

inspired by Longest Increasing Substring Task Given a list of non-negative integers, output the length of its longest alternating subsequence. An alternating sequence is a sequence of numbers which ...
Bubbler's user avatar
  • 73.8k
26 votes
40 answers
2k views

Count /[^a-z]/ig with /[a-z]/ig

Write a program or function which takes a string of text as input and outputs the number of non-alphabetical characters in it (standard I/O rules apply). A non-alphabetical character is any character ...
thejonymyster's user avatar
14 votes
10 answers
923 views

Find the biggest chunk

This challenge is not code golf. Please read the scoring before you attempt to submit an answer. You will be given a multi-line string as input. You should output the size of the largest contiguous ...
Wheat Wizard's user avatar
  • 96.5k
10 votes
5 answers
464 views

The Most Palindromy Code to Calculate Palindromy Numbers

The string abaaba Is a palindrome, meaning it doesn't change when it's reversed. However we can split it in half to make two palindromes ...
Wheat Wizard's user avatar
  • 96.5k
13 votes
23 answers
3k views

Longest Increasing Substring

Given a list of positive integers, write code that finds the length of longest contiguous sub-list that is increasing (not strictly). That is the longest sublist such that each element is greater ...
Wheat Wizard's user avatar
  • 96.5k
11 votes
9 answers
1k views

Everyone Ought to Have a Friend

An isolated character is a character (other than a newline) that doesn't have an adjacent character of the same type. Adjacent characters can be to the left, the right above or below, but not ...
Wheat Wizard's user avatar
  • 96.5k
105 votes
92 answers
10k views

Unique is Cheap

Write a function or program that determines the cost of a given string, where the cost of each character equals the number of how many times the character has occurred up to this point in the string,...
Laikoni's user avatar
  • 26.1k
30 votes
3 answers
697 views

Count spelling errors in text; minimize the number of spelling errors in your code

Write a program or function that takes two inputs: A text message The dictionary of English language, as it appears in this Github file (containing about 60000 words) and outputs the number of ...
anatolyg's user avatar
  • 13.1k
108 votes
38 answers
7k views

Source code ecological footprint

You've just been hired by a German car manufacturing company. Your first task, as an engineer, is to write a program that computes the ecological footprint of ASCII strings. The ecological footprint ...
Arnaud's user avatar
  • 8,503
11 votes
6 answers
2k views

Build a code minifier

Pick a programming language. In that language, write a function or program that takes as input a string of working code (in the same language). It should return/output a minified version of the ...
TehShrike's user avatar
  • 1,137