Giter VIP home page Giter VIP logo

boom-numbers-ts's Introduction

boom-numbers-ts

What is it

Boom numbers are numbers consisting only of digits 2 and 3. Given an integer k (0<k<=10^7) , display the k-th Boom number. reference

Trying to find algorithm to solve problem.

x           1      [ 0 ]
y           10     [ 1 ]
xx          11     [ 1 ]
xy          100    [ 2 ]
yx          101    [ 2 ]
yy          110    [ 2, 1 ]
xxx         111    [ 2, 1 ]
xxy         1000   [ 3 ]
xyx         1001   [ 3 ]
xyy         1010   [ 3, 1 ]
yxx         1011   [ 3, 1 ]
yxy         1100   [ 3, 2 ]
yyx         1101   [ 3, 2 ]
yyy         1110   [ 3, 2, 1 ]
xxxx        1111   [ 3, 2, 1 ]
xxxy        10000  [ 4 ]
xxyx        10001  [ 4 ]
xxyy        10010  [ 4, 1 ]
xyxx        10011  [ 4, 1 ]
xyxy        10100  [ 4, 2 ]
xyyx        10101  [ 4, 2 ]
xyyy        10110  [ 4, 2, 1 ]
yxxx        10111  [ 4, 2, 1 ]
yxxy        11000  [ 4, 3 ]
yxyx        11001  [ 4, 3 ]
yxyy        11010  [ 4, 3, 1 ]
yyxx        11011  [ 4, 3, 1 ]
yyxy        11100  [ 4, 3, 2 ]
yyyx        11101  [ 4, 3, 2 ]
yyyy        11110  [ 4, 3, 2, 1 ]

Getting Started

  • Install Project
$ git clone https://github.com/kbukum/boom-numbers-ts.git`
$ cd boom-numbers-ts
$ npm install
  • Start Project.
$ npm run start
  • run test
$ npm test
  • run coverage
$ npm run coverage
  • export docs
$ npm run docs
  • build code as javascript (common-js)
$ npm build

boom-numbers-ts's People

Contributors

kbukum avatar

Stargazers

 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.