-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Next smaller Element Using Stack #1869
Conversation
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible.). If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
⚡️ Lighthouse Report for the Deploy Preview of this PR 🚀
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update your code based on suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
save your file with .md
extension
\[ | ||
\text{sum} = \text{digit1} + \text{digit2} + \text{carry} | ||
\] | ||
- The new digit to be added to the result is obtained using: | ||
\[ | ||
\text{new digit} = \text{sum} \mod 10 | ||
\] | ||
- The carry for the next position is: | ||
\[ | ||
\text{carry} = \text{sum} // 10 | ||
\] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a good way you need try math formula like $$ ... $$
--- | ||
id: add-two-numbers-as-linked-lists | ||
title: "Add two numbers represented as linked lists." | ||
sidebar_label: Adding Two Numbers Represented as Linked Lists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to delete the write space because we need only one, not two.
I have saved file with extension md |
📥 Pull Request
Description
This pull request adds detailed documentation explaining the algorithm to find the next smaller element for each element in an array using a stack.
Fixes #1746
Type of change
Checklist: