Code Monkey home page Code Monkey logo

basemax / shapesalgorithm Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 153 KB

JavaScript/Algorithm: In a shape(rectangle or square) with width n and length m, We want to know how many shapes there are with width and length a and b. We also want to know the remaining forms.

Home Page: https://basemax.github.io/ShapesAlgorithm/demo.html

License: GNU General Public License v3.0

JavaScript 69.49% HTML 30.51%
algorithm algorithm-challenges algorithms javascript js data-structrues data-structure data-structure-and-algorithm data-structures data-structures-algorithms

shapesalgorithm's Introduction

Shapes Algorithm JS

Demo: https://basemax.github.io/ShapesAlgorithm/demo.html

Shapes Algorithm

About the algorithm

In a shape(rectangle or square) with width n and length m, We want to know how many shapes there are with width and length a and b. We also want to know the remaining forms. For example, in the figure below, whose width and length are 10cm x 10cm, a shape with a width and length of 3 x 3 will be output as below:

image

  • 9 items 3cm in 3cm (called G1)
  • 3 items 1cm in 3cm (called G2)
  • 3 items 3cm in 1cm (called G3)
  • And a 1cm in 1cm item (called G4)

More about the problem: https://math.stackexchange.com/questions/4533522/how-to-calculate-number-of-shapes-inside-a-shape/4533998#4533998

shapesalgorithm's People

Stargazers

 avatar  avatar  avatar

Watchers

 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.