Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [grid]

For challenges involving a grid.

Filter by
Sorted by
Tagged with
17 votes
11 answers
2k views

Straighten my corners... diagonally

We can arrange the positive integers like this: 1_| 2 | 5 | 10 4___3_| 6 | 11 9___8___7_| 12 16 15 14 13 That is, in L-shaped brackets expanding down and right ...
user avatar
  • 27.6k
9 votes
5 answers
739 views

Will this makina program halt?

makina is a cell-based esolang composed of automata which move around a grid. These automata follow paths of instructions that direct their movement. Your task is to, given a makina program using only ...
user avatar
  • 3,224
16 votes
1 answer
292 views

Simplified Piet Interpreter

Background Piet is an esoteric stack-based programming language in which programs are images meant to resemble abstract paintings. To keep the challenge from being unnecessarily complex, you will not ...
user avatar
  • 3,959
12 votes
18 answers
1k views

Words with Easy Letters in a Word Search

Introduction: Apparently I keep coming up with word search related challenges lately. :) When I do the word search in the Dutch news paper, some words are very easy to find because they contain ...
user avatar
10 votes
8 answers
2k views

How many times do I break my own rule?

Introduction: In my recent Strikethrough the Word Search List challenge I mentioned the following: When I do the word-search puzzles, I (almost) always go over the words in order, and strike them ...
user avatar
12 votes
3 answers
273 views

Line Islands in a Word Search

My third word search related challenge in a row. :) Challenge: Brief explanation of what a word search is: In a word search you'll be given a grid of letters and a list of words. The idea is to cross ...
user avatar
10 votes
3 answers
296 views

Coordinates for a Heronian tetrahedron

Did you know that Heronian Tetrahedra Are Lattice Tetrahedra? A Heronian tetrahedron is a tetrahedron where the length of each edge is an integer, the area of each face is an integer, and the volume ...
user avatar
  • 8,097
12 votes
8 answers
801 views

Spinning Word Search

Introduction: Pete likes doing word search puzzles. Despite that, he has trouble searching for words vertically, (anti-)diagonally, or reversed. Because of that, he'll always search for the words left-...
user avatar
8 votes
0 answers
249 views

Counting overlapping objects

Consider a NxN pixel grid with up to M objects drawn on it, either squares or diamonds: square    diamond The objects may overlap, so recognition is hard. The task is to give the minimal possible ...
user avatar
19 votes
1 answer
451 views

Can I wall glitch to there?

Background In a 2d game that I play, each screen is a 2d grid of tiles with walls and walkable tiles, with the player only able to travel on walkable tiles, and being stopped by walls. When the player ...
user avatar
  • 3,959
17 votes
6 answers
878 views

Retaining Water

Your task is to check the volume of water in a pool. Your have to create a program that takes in a input that is represented by an 10 by 10 grid of integers, with ...
user avatar
  • 3,051
8 votes
1 answer
186 views

Is this a Hamiltonian cycle?

There is a 3x3 square block made of 1x1 square blocks, with coins in each 1x1 block, starting from top left block you want to collect all the coins and return to top left block again, if possible ...
user avatar
  • 509
10 votes
4 answers
246 views

Score a Scrabble Play

Background In Scrabble, players take turns placing tiles on a grid so that each contiguous set of (more than one) tiles in every row and column makes a word. In one play, tiles can be placed anywhere ...
user avatar
13 votes
12 answers
1k views

Mat Printing Matrix

A manufacturing company wants to print a design on mats of varying dimensions, and they hired you to program a robot to make these mats. The design consists of alternating rings of any 2 symbols on a ...
user avatar
  • 3,051
15 votes
4 answers
321 views

Sides of a polygon

Given an ASCII-art shape made of the characters /\|_, your challenge is to return the number of sides it has. A side is a straight line of one of those, for example:...
user avatar
  • 27.6k
10 votes
2 answers
775 views

Can I shorten this Python code for simulating a car driving around

I am trying to write a solution to the following problem using as few characters as possible (to meme my friend and introduce him to golfing). Can any improvements be done to my code? So the problem ...
user avatar
18 votes
11 answers
1k views

Identify a "reverse checkers" position

Task A reverse checkers position is a chess position where every piece for one player is on one colour and every piece for the other player is on the other colour. Your task is to find if the given (...
user avatar
22 votes
6 answers
942 views

Play the Fruit Box Game

Play the Fruit Box Game Intro Fruit Box is a game consisting of a 10x17 grid of numbers, each between 1 and 9, where the goal is to clear as many numbers as possible in a two-minute time window. In ...
user avatar
  • 498
9 votes
6 answers
309 views

AoCG2021 Day 25: Stitching maps together

Part of Advent of Code Golf 2021 event. See the linked meta post for details. Related to AoC2020 Day 20, Part 1. (This day is a dreaded one for many of you, I know :P) Obligatory final "but you'...
user avatar
  • 21k
8 votes
6 answers
354 views

AoCG2021 Day 23: Finding the best seat

Part of Advent of Code Golf 2021 event. See the linked meta post for details. Related to AoC2020 Day 11, Part 2. You enter the waiting area for a ferry, and you see a bunch of people sitting at a ...
user avatar
  • 62.2k
13 votes
15 answers
546 views

AoCG2021 Day 21: Blinking through the forest [duplicate]

Part of Advent of Code Golf 2021 event. See the linked meta post for details. Related to AoC2020 Day 3. On the way to vacation, you're traveling through a forest on an airplane. For some biological ...
user avatar
  • 62.2k
24 votes
17 answers
2k views

Is the room lit up?

Imagine you have a grid where some squares are walls, some are empty, and some are lights that shine for arbitrary distances in the four cardinal directions until they meet walls: ...
user avatar
  • 27.6k
10 votes
11 answers
360 views

AoCG2021 Day 18: Stripping Strips

Part of Advent of Code Golf 2021 event. See the linked meta post for details. The story continues from AoC2018 Day 3. But you're not Bubbler, you're Lyxal! yeah, I know. After a long period of chaos, ...
user avatar
  • 21k
25 votes
7 answers
777 views

Stitch a hitomezashi pattern

Challenge Given two binary vectors (containing two consistent values of your choice) of length \$n\$ and \$m\$, output a corresponding ascii-art hitomezashi stitching pattern. You are to fill the ...
user avatar
  • 10.9k
17 votes
12 answers
557 views

AoCG2021 Day 15: Leapfrog Santa

Part of Advent of Code Golf 2021 event. See the linked meta post for details. The story continues from AoC2015 Day 3, Part 2. This challenge was kindly contributed by Wheat Wizard (Grain Ghost). ...
user avatar
  • 62.2k
12 votes
9 answers
1k views

AoCG2021 Day 13: Defrag in action!

Part of Advent of Code Golf 2021 event. See the linked meta post for details. The story continues from AoC2017 Day 14. To recap: The disk is a rectangular grid with \$r\$ rows and \$c\$ columns. Each ...
user avatar
  • 62.2k
15 votes
21 answers
1k views

AoCG2021 Day 12: Oct's Fool

Part of Advent of Code Golf 2021 event. See the linked meta post for details. The story continues from AoC2017 Day 11. Obligatory why me and not Bubbler link After having rescued a child process lost ...
user avatar
  • 21k
16 votes
14 answers
1k views

AoCG2021 Day 9: Spiral memory stress test

Part of Advent of Code Golf 2021 event. See the linked meta post for details. Related to AoC2017 Day 3, Part 2. You come across an experimental new kind of memory stored on an infinite two-...
user avatar
  • 62.2k
13 votes
12 answers
901 views

AoCG2021 Day 8: Delivery Corrections

Part of Advent of Code Golf 2021 event. See the linked meta post for details. The story continues from AoC2015 Day 3, Part 2. This challenge was kindly contributed by Wheat Wizard (Grain Ghost). ...
user avatar
  • 62.2k
17 votes
15 answers
3k views

AoCG2021 Day 7: Bathroom security goes wild

Part of Advent of Code Golf 2021 event. See the linked meta post for details. The story continues from AoC2016 Day 2, Part 2. You finally figure out the bathroom code (on the weird diamond-shaped ...
user avatar
  • 62.2k
15 votes
4 answers
670 views

Simulate weathering of a rock

Inspired by my geography class, Sandboxed Simulate weathering / erosion. Input Input will be given as a string of any 2 characters (or see below) you like in the shape of the rock (here i use spaces ...
user avatar
  • 1,579
24 votes
17 answers
3k views

AoCG2021 Day 1: Automated delivery frenzy

Originally from caird coinheringaahing's idea, I (Bubbler) am hosting Advent of Code Golf 2021. On each day from today (Dec 1) until Christmas (Dec 25), a challenge will be posted at UTC midnight, ...
user avatar
  • 62.2k
9 votes
2 answers
241 views

A rolling drop gathers all pearls?

Quell is a single-player grid-based puzzle game. Pearls are scattered across a 2D map and the aim is to collect them all by rolling a drop of water over them. For this challenge we will only consider ...
user avatar
  • 10.3k
13 votes
8 answers
1k views

Find the number of paths in a n×n grid

Information Given a non-negative odd integer (let's call it \$n\$), find the number of all possible paths which covers all squares and get from the start to end on a grid. The grid is of size \$n\$×\$...
user avatar
  • 1,579
19 votes
3 answers
2k views

Crossing a river with weird animals

Background One kind of river-crossing problems involves two kinds of animals. One such problem reads like this: (all wordings, including animal species, are arbitrary) A farmer has to cross a river ...
user avatar
  • 62.2k
14 votes
10 answers
933 views

Revert Flow Free puzzle

Inspired by Is this Flow Free puzzle trivial? by @Bubbler. Lengthy chunks of this challenge are borrowed from there. This may be one step of a solution for the linked challenge, depending on chosen ...
user avatar
  • 10.9k
19 votes
13 answers
2k views

The Area of Rectangles

Getting the area covered by a rectangle is really easy; just multiply its height by its width. However in this challenge we will be getting the area covered by multiple rectangles. This is equally ...
user avatar
  • 85.1k
13 votes
2 answers
562 views

Is this Flow Free puzzle trivial?

Background Flow Free is a series of puzzle games whose objective is to connect all the same-colored pairs of dots on the grid. In this challenge, we consider the original game on a rectangular grid (...
user avatar
  • 62.2k
24 votes
20 answers
3k views

Find the longest line

Given a string containing only the characters -, |, + and newline determine the longest ...
user avatar
  • 85.1k
15 votes
2 answers
594 views

Validate Sudoku on a Mobius Strip

@BeastlyGerbil presents, the world's very first MOBIUS SUDOKU: Google Sheets version (The left most square backs onto the right most square, and the middle squares back onto each other. The ends are ...
user avatar
10 votes
7 answers
2k views

Game of Life, but on a 4-8-8 tiling

Background The 4-8-8 tiling looks like this: For the purpose of this challenge, we take the orientation of the tiling as exactly shown above. In plain English words, we take the tiling so that it can ...
user avatar
  • 62.2k
13 votes
2 answers
283 views

Draw constraint system #18762389

Background Page 219 of A New Kind of Science (a book by Stephen Wolfram, the creator of Mathematica) shows an interesting 2D pattern generated by constraints. The relevant section in the book starts ...
user avatar
  • 62.2k
9 votes
3 answers
309 views

How many dominoes can you fit here?

Much harder than Can this pattern be made with dominoes? Challenge A grid of width \$w\$ and height \$h\$ is given, filled with 1s and 0s. You can place a domino somewhere on the grid only if both ...
user avatar
  • 62.2k
23 votes
8 answers
4k views

Obfuscate my ><>

><>, or Fish, is a two-dimensional esoteric programming language where the instruction pointer (IP) toroidally moves around the codebox, wrapping when it hits an edge. ><> has four ...
user avatar
  • 27.6k
15 votes
6 answers
521 views

Counting maximal domino placements

Background A maximal domino placement (MDP) on a rectangular grid is a non-overlapping placement of zero or more dominoes, so that no more dominoes can be added without overlapping some existing ...
user avatar
  • 62.2k
7 votes
6 answers
514 views

Group binary shapes together

Consider the following binary matrix: $$\begin{matrix} 1 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 1 \end{matrix}$$ The (1-indexed) co-ordinates of the \$1\$s here are \$(1,1), (1,3), (2,...
user avatar
18 votes
3 answers
725 views

Sliding Dice in a Dish

We have 3 dice in a square dish. The dish is 8 units wide and tall and each die is 3 units wide and tall. The dice are facing up each with a different number on their top face. ...
user avatar
  • 85.1k
39 votes
15 answers
2k views

Maximum number of squares touched by a line segment

Consider a square grid on the plane, with unit spacing. A line segment of integer length \$L\$ is dropped at an arbitrary position with arbitrary orientation. The segment is said to "touch" ...
user avatar
  • 99.4k
21 votes
10 answers
2k views

Elevator sequence

Totally not inspired by Lyxal repeatedly mentioning elevators in chat :P Challenge In short: simulate some people filling up an elevator and then leaving it. The elevator is simplified as a grid, ...
user avatar
  • 62.2k
18 votes
11 answers
2k views

Count my Pluses

Your task is, to count how many pluses I have. What Pluses? The no plus: 0 Points - The naïve Plus: 1 Point + The double ...
user avatar
  • 3,605

1
2 3 4 5
8