Skip to content

IMPLEMENT CORE DP PROBLEMS#358

Merged
Pradeepsingh61 merged 1 commit into
Pradeepsingh61:mainfrom
durvaakadam:add-dp-algorithms
Oct 3, 2025
Merged

IMPLEMENT CORE DP PROBLEMS#358
Pradeepsingh61 merged 1 commit into
Pradeepsingh61:mainfrom
durvaakadam:add-dp-algorithms

Conversation

@durvaakadam
Copy link
Copy Markdown
Contributor

Pull Request Description

What does this PR add?

  • ✅ New algorithm implementations (Dynamic Programming)
  • ✅ Test cases
  • ✅ Documentation improvement

Algorithm/Feature Details

  • Algorithms Added:

    1. fibonacci_sequence.c – Compute Fibonacci numbers using DP (bottom-up and memoization approaches)
    2. longest_common_subsequence.c – Find LCS of two strings with DP table
    3. coin_change_problem.c – Count minimum coins or ways to make change using DP
    4. maximum_subarray_sum.c – Kadane’s algorithm for maximum subarray sum
  • Language: C

  • Category: Dynamic Programming Algorithms

  • Time Complexity: Varies per algorithm (usually O(n²) for LCS/coin change, O(n) for Fibonacci/Kadane)

  • Space Complexity: Varies (O(n²) for LCS/coin change, O(n) for Fibonacci, O(1) for Kadane)

Implementation Highlights

  • ✅ Comprehensive comments explaining each step
  • ✅ Test cases covering normal and edge scenarios
  • ✅ Efficient DP implementations (bottom-up or optimized space)
  • ✅ Follows repository coding standards

Key Components

  • DP tables for LCS and coin change
  • Iterative and memoized Fibonacci implementations
  • Kadane’s algorithm for maximum subarray sum
  • Test drivers included in each file

Applications

  • Computing optimized solutions for classical DP problems
  • Useful for competitive programming and coding interviews
  • Educational purposes for learning dynamic programming concepts

File Structure Added

C/dynamic_programming/
├── fibonacci_sequence.c
├── longest_common_subsequence.c
├── coin_change_problem.c
└── maximum_subarray_sum.c

Hacktoberfest 2025

This PR is submitted for Hacktoberfest 2025.
If possible, please add the hacktoberfest label. Thank you!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 3, 2025

🎉 Welcome to Hacktoberfest 2025, @durvaakadam! 🎃

Thank you for your first contribution to our DSA repository! Here's what happens next:

🔍 Automatic Checks

  • Code Validation: Passed
  • 🧪 Compilation Tests: Passed

📋 Next Steps

🎯 Great job! Your code compiled successfully. Maintainers @Karanjot786 and @Pradeepsingh61 will review your PR soon.

🎁 What You Get

  • 🏆 Hacktoberfest Credit: This PR counts toward your 6 PR goal for exclusive T-shirt + Tree!
  • 🌟 Hall of Fame: You'll be featured in our contributors list
  • 📚 Learning: Code review feedback from experienced developers

💡 Tips for Success

  • Follow our Contributing Guidelines
  • Add comments explaining your algorithm
  • Include time/space complexity analysis
  • Test your code before submitting

Welcome to the community! 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 3, 2025

🤖 Automated PR Status

🔍 Code Validation

Passed - File naming and structure look good!

🧪 Compilation Tests

Passed - All code compiles successfully!

📋 Overall Status

🎉 Ready for Review - Your PR has passed all automated checks!
👥 Maintainers have been notified for review.


This comment was generated automatically. Checks will re-run when you push new commits.

@github-actions github-actions Bot requested a review from Karanjot786 October 3, 2025 06:47
Copy link
Copy Markdown
Collaborator

@Karanjot786 Karanjot786 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pradeepsingh61 merge it and @durvaakadam thanks for this PR

@Pradeepsingh61 Pradeepsingh61 merged commit e948edd into Pradeepsingh61:main Oct 3, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants