Skip to content

more optimized#259

Open
Anshuman7080 wants to merge 1 commit intosachinsingh3232:mainfrom
Anshuman7080:main
Open

more optimized#259
Anshuman7080 wants to merge 1 commit intosachinsingh3232:mainfrom
Anshuman7080:main

Conversation

@Anshuman7080
Copy link
Copy Markdown

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