Linked Questions

55 votes
63 answers
8k views

Is this string a square?

A string is considered to be square if the following conditions are met: Each line has the same number of characters The number of characters on each line is equal to the number of lines. Your task ...
Pavel's user avatar
  • 9,377
62 votes
48 answers
7k views

Are the brackets fully matched?

You must write a program or function that takes a string of brackets and outputs whether or not that string is fully matched. Your program should print a truthy or falsy value, and IO can be in any ...
DJMcMayhem's user avatar
  • 59.3k
103 votes
24 answers
18k views

Where's the 0xBEEF?

This challenge was inspired by this Wendy's commercial from 1984. Illustration by T S Rogers Your task is to find a hexadecimal 0xBEEF on a binary bun. The 'beef' consists of the following pattern: ...
Arnauld's user avatar
  • 193k
32 votes
18 answers
8k views

To find islands of 1 and 0 in matrix

Given a two dimensional matrix of 0 and 1s. Find the number of island for 1s and 0s where neighbours are only in the horizontal and vertical. ...
KB joy's user avatar
  • 329
42 votes
18 answers
4k views

Hotel room numbering

Given an input of a "hotel" in ASCII art with a single room marked, output the room number according to certain rules. Here's an example of an ASCII hotel: ...
Doorknob's user avatar
  • 71.5k
56 votes
4 answers
5k views

Nether Portal Detection

The video game Minecraft is all about placing and removing different types of blocks in the 3D integer lattice that makes up the virtual world. Each lattice point can contain exactly one block or be ...
Calvin's Hobbies's user avatar
23 votes
24 answers
2k views

Verifying a horizontal ASCII pet snake

Recently there have been a couple of ASCII pet snake challenges (e.g. here) ...
Mirror318's user avatar
  • 349
31 votes
12 answers
2k views

Official Ruby Inspector

Here is a simple ASCII art ruby: ___ /\_/\ /_/ \_\ \ \_/ / \/_\/ As a jeweler for the ASCII Gemstone Corporation, your job is inspect the newly acquired rubies ...
Calvin's Hobbies's user avatar
22 votes
17 answers
3k views

Connect Four Validator

Introduction Connect Four is a game where you attempt to get four in a row: horizontally, vertically, or diagonally. In this code golf, we will be trying to find who won, given a game board. There ...
Neil's user avatar
  • 2,525
26 votes
8 answers
2k views

Mutually Attacking Queens

Let an 8x8 chessboard be represented by any two distinct values, with one value being an empty square and the other being a queen. In the following examples, I use 0s as the empty squares and 1s as ...
JMigst's user avatar
  • 879
28 votes
8 answers
1k views

ASCII topology pt 1: Can I count on you?

I have a serious problem. I have some text files where I keep my very important numbers -- all of the important ones! And twos, and threes.. These numbers were so important that I couldn't entrust ...
Matt Noonan's user avatar
  • 1,054
17 votes
12 answers
2k views

Verify the queens puzzle

If you don't know what a queen is in chess, it doesn't matter much; it's just a name :) Your input will be a square of arbitrary width and height containing some amount of queens. The input board ...
Okx's user avatar
  • 16.4k
14 votes
8 answers
2k views

Can Mario go to the end of this map

Create a program that determines, given an input of the path, whether Mario can reach the end, denoted by E, from the start, denoted by ...
TuxCrafting's user avatar
  • 4,837
31 votes
5 answers
1k views

Recognize a vine

Background I have a bunch of old and grainy black-and-white images. Some of them depict vines climbing on a wall, others don't – your task is to classify them for me. Input and output Your ...
Zgarb's user avatar
  • 42.7k
20 votes
7 answers
2k views

Minecraft Chest Placement

The video game Minecraft is all about placing and removing different types of blocks in the 3D integer lattice that makes up the virtual world. Each lattice point can contain exactly one block or be ...
Calvin's Hobbies's user avatar

15 30 50 per page