Top new questions this week:
|
Given two rectangles, which are possibly not in the orthogonal direction, find the area of their intersection. Input You may take the rectangles as input in one of the following ways: The …
|
Inverse function of this challenge To (properly) multiply an string by an integer, you split the string into characters, repeat each character a number of times equal to the integer, and then stick …
|
I just discovered this site and this is my first question, I hope I’m doing it correctly. The challenge is the following, you must write a code that prints all the prime numbers of \$n\$ digits. Since …
|
The standard way to round numbers is to choose the nearest whole value, if the initial value is exactly halfway between two values, i.e. there is a tie, then you choose the larger one. However where I …
|
I have this problem where I listen to so much music that I can never remember what songs are called. But even if I remember the lyrics, I won’t always know the song’s name. But lucky for me, there’s a …
|
Consider a list of subject, grade pairs. E.g. …
|
Introduction Our goal is to efficiently find the maximum of a large amount of (redundant) data. We define the outer product of vectors \$A\$ and \$B\$ as a matrix containing the products of all …
|
Greatest hits from previous weeks:
|
Your favourite programming language has just had a birthday. Be nice and sing it the Happy Birthday song. Of course you should accomplish this by writing a program in that language. The program takes …
|
There have been many other flag challenges posted but not one for the national flag of France. This week seems like an appropriate time. Produce this flag in the fewest bytes possible: The image must …
|
This year’s UEFA Euro 2016 is over and besides a couple of negative headlines there has been a very positive surprise as well – the Iceland national football team. Let’s draw their national flag. …
|
Goal The goal of this challenge is to write code that will execute once and only once. This means basically that it damages the program, script, or environment in some way. If rebooting the system …
|
Boys and girls are excited to see Fifty Shades of Grey on the silver screen, we just want to code without being bothered, so here’s a challenge to pick our brain. You have to: Print on the screen …
|
Challenge: In the programming language of your choice, shut down the machine that your code was executed on. Rules No shutting down by resource exhaustion (e.g.: forkbomb to force shutdown) You are …
|
In Fewest (distinct) characters for Turing Completeness, the goal is to find the minimum number of characters which make a language Turing Complete…in other words, allow it to do any computation …
|