# All Questions

10,506 questions
384 views

### Marquee sign letters

Each day you put up a new word on a marquee sign with movable letters, buying just the letters you need to write it. You re-use letters you've bought for earlier words whenever possible. Given the ...
41 views

### Intercommunication between threads [on hold]

so glad i found this cool site. wanted to try sharing a coding challenge a friend gave me, an interview question. usually it is written in java, but you can use whatever language you want, just have ...
130 views

### Draw the Easter Bunny

This happy individual is known in folklore as the Easter Bunny. Colours It is created using 4 colours: Light pink Dark pink White Black (I'm happy for these colours to be approximated in your ...
644 views

### New Order #6: Easter Egg

Introduction (may be ignored) Putting all positive integers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all ...
53 views

### How many mentees can be met in 24 hours? [on hold]

You've got several mentees that you need to meet with on some day and they've all given you a potential block of time they can meet. You've been given two arrays, one with the start times (as "s") and ...
61 views

### Intel prefixes instructions, checking optimisations problems [on hold]

I wanted to learn more on ptrace's functions with x86_64 binaries, disassembling instructions. The goal is to check if a byte is one of instructions prefixes. I found some information in the Intel® ...
1k views

### The Nth Gryphon Number

I came up with a series of numbers the other day and decided to check what the OEIS number for it was. Much to my surprise, the sequence did not appear to be in the OEIS database, so I decided to ...
1k views

### Maximum summed subsequences with non-adjacent items

Introduction: Inspired by these two SO questions (no doubt from the same class): print the elements in the subarray of maximum sum without adjacent elements java and Maximum sum of non adjacent ...
4k views

### Amount of permutations on an NxNxN Rubik's Cube

Introduction: A 3x3x3 Rubik's Cube has $43,252,003,274,489,856,000$ possible permutations, which is approximately 43 quintillion. You may have heard about this number before, but how is it actually ...
459 views

### A Megachess Board

You want to create a square chessboard. Adjacent tiles must alternate black and white like a standard chessboard, and the bottom left corner can be either black or white. Your program will take in ...
5k views

### Generate an RGB colour grid

This! is an RGB colour grid... Basically it's a 2-dimensional matrix in which: The first row, and the first column, are red. The second row, and the second column, are green. The third row, and the ...
2k views

### Fundamental Solution of the Pell Equation

Given some positive integer $n$ that is not a square, find the fundamental solution $(x,y)$ of the associated Pell equation $$x^2 - n\cdot y^2 = 1$$ Details The fundamental $(x,y)$ is a pair ...
2k views

### List of Python versions

Python is the fastest-growing major programming language today. It is the most wanted language for the third year in a row, meaning that developers who do not yet use it say they want to learn it. [1]....
1k views

### Output the ŋarâþ crîþ alphabet song without using (m)any letters

Your goal is to write a program that takes no input and outputs the following text: ...
3k views

### List *all* the tuples!

Write a program, given an input n, will generate all possible n-tuples using natural numbers. ...
1k views

### Letter Boxed validator

The New York Times has a daily online game called Letter Boxed (the link is behind a paywall; the game is also described here), presented on a square as follows: You are given 4 groups of 3 letters (...
1k views

### Area of a 2D convex hull [closed]

You are given an array/list/vector of pairs of integers representing cartesian coordinates (x, y) of points on a 2D Euclidean plane; all coordinates are between −104 and 104, duplicates are allowed. ...
50 views

### How can i merge multiple images woth Python given the opacity of each one? [closed]

This is for a project. I have a list of the different opacities and a list of the RGB for example [0.2 , 0.15, 0.05, 0.3, 0.2] for the opacities and [(100,0,2) ,(200,100,1),(15,34,222),(123,213,22),(...
615 views

### New Order #5: where Fibonacci and Beatty meet at Wythoff

Introduction (may be ignored) Putting all positive numbers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all ...
2k views

### Stars Make Stars

Introduction The idea is to use the asterisk character (star) * to display an ascii-art star at a specified dimension. The dimension is an input number greater ...
1k views

### Slither Like a Snake

The Idea We've done matrix spirals before, and full rotations, and even diagonal rotations, but not, as far as I can find, snake rotations! What is a snake rotation? Imagine the rows of a matrix ...
39 views

### Delete a node in the link list [closed]

I am doing my assignment where I was asked to create a menu driven dictionary in which a user can enter or remove the word. I have created the method however, for removing method it checks for the ...
47 views

### java puzzle 2D grid and scanner [closed]

A farmer wants to reorganize the crops growing in his farm. The farm is in the form of an N X M grid with each cell in the grid being a square plot. Each plot has to be planted with a variety of crop. ...
746 views

Test Driver • Challenge Discussion • Submit Adventurer (Image Source) Several rival adventurers are raiding the ruins for treasure, but they can only carry so much at a time and have their ...
4k views

### Simulating Exploding Dice

Your task is to make a program that takes in an integer n > 1, and outputs the roll of a single n-sided die. However, this ...
2k views

### Make it rain characters

Inspired by this chat mini-challenge. Given a string as input (ASCII printable characters only), output the string with the letters "raining" down. Each letter must be a random number of lines ...
493 views

### Can a neural network recognize primes?

Background Recognizing primality seems like a poor fit for (artificial) neural networks. However, the universal approximation theorem states that neural networks can approximate any continuous ...
2k views

### Match Roman Numerals

Challenge Given some input string, return a truthy value if it represents a correct roman numeral between 1 (=I) and 3999 (=...
1k views

### Multiply Two Integer Polynomials

Your task is to take two single-variable integer polynomial expressions and multiply them into their unsimplified first-term-major left-to-right expansion (A.K.A. FOIL in the case of binomials). Do ...
3k views

### Worn-tile Scrabble

Problem You're stuck in a cabin in the middle of the woods, with only an old scrabble set to entertain yourselves. Upon inspection you see that the scrabble letters are so worn, that only the points ...
80 views

### Output the Missing Character [duplicate]

When writing a programm 1 missing character can ruin everything, wouldn't it be great if the programm told you what was missing ? Task: Create any (non Empty) programm, that takes no input and ...
4k views

### Output the Arecibo Message

The Arecibo message is a 1974 interstellar radio message carrying basic information about humanity and Earth sent to globular star cluster M13 in the hope that extraterrestrial intelligence might ...
2k views

118 views

### Minimum cost of solving the Eni-Puzzle

You're tasked with writing an algorithm to efficiently estimate cost of solving an Eni-Puzzle from a scrambled state as follows: You're given m lists of containing n elements each(representing the ...
You are given four numbers. The first three are $a$, $b$, and $c$ respectively, for the sequence: $$T_n=an^2+bn+c$$ You may take input of these four numbers in any way. The output should be ...