Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stock Span #533

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Stock Span #533

wants to merge 2 commits into from

Conversation

Abhilash42069
Copy link

Choose your form and fill it -

1. Form 1(C++ Solution contributors)

2. Form 2(C++ Documentation Contributors)


1) Form 1

Issue Id you have worked upon -

Kindly write your answer here

Briefly explain your program logic -

Kindly write your answer here

Screenshots(Attach 2 screenshots of your own input and output) -

Attach here


Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your code for merging -

  • [] I have mentioned the question as comment in my solution file.

  • [] My code follows the guidelines of this project.

  • [] I have performed a self-review of my own code.

  • [] I have commented my code.

  • [] My code gives the correct output.

  • [] I confirm that I have not copied the code from anywhere. In case its found that I have copied even after successful merge then I can be banned from the repository and hacktoberfest.

  • [] I affirm that I strictly follow contributing guidelines and code of conduct.


2) Form 2

Issue Id you have worked upon -

Kindly write your answer here


Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your Pull Request for merging -

  • [] I have performed a self-review of my documentation.

  • [] I affirm that I strictly follow contributing guidelines and code of conduct.

Afzal has been working with an organization called 'Money Traders' for the past few years. The organization is into the money trading business. His manager assigned him a task. For a given array/list of stock's prices for N days, find the stock's span for each day.
The span of the stock's price today is defined as the maximum number of consecutive days(starting from today and going backwards) for which the price of the stock was less than today's price.
For example, if the price of a stock over a period of 7 days are [100, 80, 60, 70, 60, 75, 85], then the stock spans will be [1, 1, 1, 2, 1, 4, 6].
@SarthakKeshari
Copy link
Owner

@Abhilash42069,
Kindly create an issue first and then PR. And follow the PR template and contribution guidelines.
I am not closing this PR since this was your first time. You may refer CONTRIBUTING.md(present in the repository) and create an issue(iff program has not been done in repositories probable folders).

If above given lines follow, then kindly create an issue now and claim it. I will assign it to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants