Giter Club home page Giter Club logo

helsinki-puzzle's Introduction

Helsinki-Puzzle

Grid Puzzle

Description

Given a square grid of size N, where the horizontal rows are numbered 1 to N from top to bottom and the vertical columns are numbered 1 to N from left to right. You must place a number in each cell of the N by N grid such that :-

  • Each row is unique.
  • Each row is exactly equal to one of the columns, however, it must not bethe column with the same index as the row.
  • If X is the largest number you place in the grid, then you must also place1,2,...,X-1, where the condition X โ‰ค N is satisfied.

Example

For a 4 ร— 4 grid, you may have the following matrix

c1 c2 c3 c3
r1 1 2 3 1
r2 3 4 4 2
r3 2 4 4 3
r4 1 3 2 1

defined by the following equalities:

  • c1 = r4
  • c2 = r3
  • c3 = r2
  • c4 = r1

Acknowledgment

This project outline was designed by the MET department at the German University in Cairo link.

helsinki-puzzle's People

Contributors

sarahmed avatar

Stargazers

Salma Abdalla avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.