Skip to content

Conversation

@kaloa2025
Copy link

Summary

This pull request adds a complete implementation of Infix to Postfix Conversion along with Postfix Expression Evaluation to the Algorithms.Stack namespace.

Included in this PR:

  • Conversion from infix expression → postfix expression using a stack
  • Evaluation of postfix expressions with support for operators: +, -, *, /, ^
  • Proper validation for:
    • Invalid characters
    • Mismatched parentheses
    • Insufficient operands
    • Division by zero
  • XML documentation for clarity and educational value
  • NUnit test cases covering valid expressions, invalid expressions, operator precedence, and edge cases

This algorithm is a classic application of stacks and fits perfectly under the existing Algorithms.Stack category in this repository.


Checklist

  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have added tests that prove my feature works
  • New and existing unit tests pass locally with my changes

@kaloa2025 kaloa2025 requested a review from siriak as a code owner November 13, 2025 08:00
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 86.61417% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.82%. Comparing base (52e4ef3) to head (2ebe57f).

Files with missing lines Patch % Lines
Algorithms/Stack/InfixToPostfix.cs 86.61% 11 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #577      +/-   ##
==========================================
- Coverage   96.93%   96.82%   -0.11%     
==========================================
  Files         297      298       +1     
  Lines       12287    12414     +127     
  Branches     1781     1807      +26     
==========================================
+ Hits        11910    12020     +110     
- Misses        239      250      +11     
- Partials      138      144       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siriak
Copy link
Member

siriak commented Nov 13, 2025

Please check the test coverage of your code in Codacy

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.

2 participants