Top new questions this week:
|
Take the sequence of all natural numbers in binary, (1, 10, 11, ..) then write them vertically beside each-other like this (least significant bit on top; 0s have …
|
SVG is an XML vector graphics markup language embeddable in web content. Your tips should be at least somewhat specific to SVG. Please post one tip per answer.
|
Description “Imtiaz Germain primes” is not a technical name in Mathematics, but my weird creation, in the memoir of the famous mathematician Sophie Germain. These primes can be generated by …
|
Given a string of parentheses ( and ), find the length of the longest substring that forms a valid pair of parentheses. Valid …
|
(Similar: Through the bases) Normally, our number system is base ten, with the digits 0123456789. However, we can increase or decrease the base count (so …
|
Challenge: Find the number of distinct words in a sentence Your task is to write a program that takes a sentence as input and returns the number of distinct words in it. For this challenge, words are …
|
Your function must accept two strings and return new string where are UTF-16 code of all symbols is the sum of UTF-16 codes of inputs symbols If the resulting sum is greater than …
|
Greatest hits from previous weeks:
|
“Baby Shark” is a children’s song about a family of sharks. Having long been popular as a campfire song, it has been popularized since the mid-2000s by social media, online video and radio. – …
|
Your task is to display the letter “A” alone, without anything else, except any form of trailing newlines if you cannot avoid them, doing so in a program and/or snippet. Code that returns (instead of …
|
Here is a theoretical question – one that doesn’t afford an easy answer in any case, not even the trivial one. In Conway’s Game of Life, there exist constructs such as the metapixel which allow the …
|
Introduction The game Minecraft has a 1 in 10000 chance of showing “Minceraft” instead of “Minecraft” on the title screen. Your challenge Your challenge is to code a function or …
|
Following the best security practices, I keep a plain text file with my passwords on my hard drive. In fact, I just copied and pasted one of them to access my PPCG account. In a lucid moment, I decide …
|
The challenge is simple: Print the last, middle, and first character of your program’s source code, in that order. The middle character is defined as follows, assuming a source length of …
|
Inspired by this blog post. Write a program that outputs 99 distinct programs (in the same language) that output the string I love you. How the programs are …
|
Can you answer these questions?
|
Write a program that takes a string as input and modifies it by reversing the string in its place by mirroring the position. The first position goes to last, second to second last and so it goes on. …
|
There’s a lot of questions about Conway’s Game of Life, but nothing about customization (Related: 2-Player Life). Given an input, determine the result on a 100×100 grid after some iterations. The …
|