Giter VIP home page Giter VIP logo

11057's Introduction

"11057"

made by Jaehyeok Choi

Welcome to Jaehyeok's github!

What is the problem?

button

What Algorithm should I use?

dynamic programming

What was the key point and the hard part?

Increasing number include same number. (ex. 0000, 00011122333388)

0 can be added only after the number ends with 0.

1 can be added only after the number ends with 0 or 1.

Following these sequences, I though keep checking the end number of increasing number will work.

I made a dp and save the number of end number of all possible increasing number.

n = 1

index 0 1 2 ... 9 number 1 1 1 ... 1 prev array

When n is 2, 0 can be added to the number ends with 0, so index 0 value will always 0. 1 will be added to the number ends with the 0 and 1, so add index 0 value + index 1 value. 2 will be added to the number ends with the 0,1 and 2, so add index 0 value + 1 value + 2 value.

However, I alreay added the index 0 value + index 1 value in the current array[i-1] adding it with index 2 value in the previous array with it will work.

index 0 1 2 ... 9 number 1 2 3 ... 9 in here 3 is not adding (prev[index0] + prev[index1] + prev[index2]) it is adding ( prev[2] + index[2-1])

I use sliding window to save the space complexity.

Where can I get more help, if I need it?

You can contact me through email, which is [email protected]. Thank you for visiting this github!

11057's People

Contributors

bulttaeng avatar

Watchers

 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.