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

Add Kadane's Algorithm to 1D Array #1183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anushka1511
Copy link

Pull Request for PyVerse 💡

Requesting to submit a pull request to the PyVerse repository.


Issue Title

Please enter the title of the issue related to your pull request.
Enter the issue title here.
Addition of new algorithm: Kadane's algorithm

  • I have provided the issue title.

Info about the Related Issue

What's the goal of the project?
Describe the aim of the project.
The aim of this project is to add the implementation of Kadane's Algorithm to the Array folder within the Algorithms and Data Structures directory. Kadane's Algorithm is a crucial concept in DSA, designed to find the maximum subarray sum efficiently. It has been frequently asked in the online assessments (OAs) of many companies.

  • I have described the aim of the project.

Name

Please mention your name.
Enter your name here.
Anushka Garg

  • I have provided my name.

GitHub ID

Please mention your GitHub ID.
Enter your GitHub ID here.
anushka1511

  • I have provided my GitHub ID.

Email ID

Please mention your email ID for further communication.
Enter your email ID here.
[email protected]

  • I have provided my email ID.

Identify Yourself

Mention in which program you are contributing (e.g., WoB, GSSOC, SSOC, SWOC).
Enter your participant role here.
SWOC

  • I have mentioned my participant role.

Closes

Enter the issue number that will be closed through this PR.
Closes: #issue-number
#1172

  • I have provided the issue number.

Describe the Add-ons or Changes You've Made

Give a clear description of what you have added or modified.
Describe your changes here.
Added a function implementing Kadane’s Algorithm which calculates and prints the maximum subarray sum of a given array. This algorithm efficiently finds the maximum sum in O(n) time by calculating a running sum and updating the maximum sum found.

  • I have described my changes.

Type of Change

Select the type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Describe how your changes have been tested.
Describe your testing process here.
The code has been tested with various array inputs of different values and sizes.

  • I have described my testing process.

Checklist

Please confirm the following:

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added things that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules.

Copy link

👋 Thank you for opening this pull request! We're excited to review your contribution. Please give us a moment, and we'll get back to you shortly!

Feel free to join our community on Discord to discuss more!

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.

1 participant