« first day (134 days earlier)      last day (181 days later) » 

9:05 AM
BMG Drafts for 22nd september starts here
Draft: assume you're given a list of numbers, e.g. [1, 2, 3, 4]

order the list such that sum of the distance from a given number to all other numbers is the smallest, preserving the original order when the sums are the same
for example, in the above list, the distance from 1 to 2 is 1, distance from 1 to 3 is 2, and dist from 1 t o4 is 3 - the sum of that is 6
likewise for 2, you'd get 4
and for 3, you'd get 4
and for 4, you'd get 6
 
9:21 AM
Draft: given an array, make it unsorted. Only condition is that the array cannot be in ascending or descending order.
Draft: Read a line of input. If it's only composed of digits, print it as is. Otherwise, print the input reversed.
 
Draft: Print Prime numbers from 100 to 200.
Draft: Check if the given string contains a consecutive sequence of 1s or 0s. Ex: "0110010" -> True, "aaaaa" -> False, 'a line 0' -> True.
 
9:38 AM
i think you mean or 0s
 
I'll be asleep when it starts :p
 
Draft: Given 2 positive numbers, convert them to binary and add them (base 10 vectorised addition). Ex: 12, 2 -> [1,1,1,0]; 2, 3 -> [2,1]
 
Draft: Given a positive integer, return the smallest base in which its digits are strictly ascending or descending.
 
@emanresuA contributing drafts is also participating!
 
Polyglot, 2 bytes: 10
 
9:48 AM
wait
Draft: Given 3 numbers (x,y,z) compute: x-1+z!*(x÷y)
 
Draft: Generate a floating point error
 
 
2 hours later…
11:50 AM
Draft: APL-style Grade up an array.
 
12:09 PM
Draft: Given a 2x2 matrix, output it's determinant
 

« first day (134 days earlier)      last day (181 days later) »