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

more optimized #259

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

Conversation

Anshuman7080
Copy link

Use of std::vector: The code now uses std::vector for dynamic sizing, which improves memory management and makes it easier to handle resizing.
Sorting Function: The sorting function is encapsulated and utilizes a lambda function to simplify the sorting criteria.
Elimination of Unnecessary Deletions: Instead of deleting elements, the addition logic directly fills the resulting array.
Reduced Code Complexity: Simplified the logic for adding matrices, reducing the number of conditions and loops.
Improved Display Logic: The display logic checks for non-zero values in a more straightforward way.

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