Git Product home page Git Product logo

Comments (5)

the-vampiire avatar the-vampiire commented on July 30, 2024

@rosdyana hey thanks for the new challenge! i think you forgot the goal / challenge of the problem. would this be correct?

your function should accept a comma-separated string input of earning/spending activity and return the sum of earnings as a single int value

from hacktoberithms.

rosdyana avatar rosdyana commented on July 30, 2024

@the-vampiire yeah, you're correct 👍

from hacktoberithms.

mikelane avatar mikelane commented on July 30, 2024

In the test data, can you explain why the streak is 5?

input:
1,3,-2,1,2
output:
5

I think it should be 4 starting on the 1st day and ending on the 2nd day.

from hacktoberithms.

rosdyana avatar rosdyana commented on July 30, 2024

hi @mikelane , it's 5 because the spending (-2) is less than earning (1+3), he still have $2 , so it's not broke the rules.
the second example
0,7,0,2,-12,3,0,2
after got $9 from earning, he spent $12, and the balance become minus, so it's broke the rules and need start counting the highest earning from 6th till 8th days

from hacktoberithms.

mikelane avatar mikelane commented on July 30, 2024

Should this be able to handle float values?

from hacktoberithms.

Related Issues (10)

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.