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

Next smaller Element Using Stack #1869

Closed
wants to merge 4 commits into from

Conversation

riyaa060
Copy link
Contributor

@riyaa060 riyaa060 commented Nov 6, 2024

📥 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

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

github-actions bot commented Nov 6, 2024

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! 😊

Copy link

github-actions bot commented Nov 6, 2024

⚡️ Lighthouse Report for the Deploy Preview of this PR 🚀

🔗 Site: Algo | Live Site

URL 🌐 Performance Accessibility Best Practices SEO 📊
/algo/ 🟡 53 🟢 96 🟡 71 🟡 86 📄
/algo/docs 🟡 50 🟢 96 🟡 75 🟢 100 📄
/algo/blog 🟡 67 🟢 92 🟢 96 🟡 86 📄

@ajay-dhangar ajay-dhangar added gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels labels Nov 6, 2024
Copy link
Owner

@ajay-dhangar ajay-dhangar left a 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

Copy link
Owner

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

Comment on lines +29 to +39
\[
\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
\]
Copy link
Owner

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
Copy link
Owner

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.

@riyaa060
Copy link
Contributor Author

riyaa060 commented Nov 7, 2024

I have saved file with extension md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Idea]: Finding the Next Smaller Element Using Stack
2 participants