Skip to content

added some solution between 3000-3010 #928

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

Merged
merged 17 commits into from
Jun 11, 2024
Merged

added some solution between 3000-3010 #928

merged 17 commits into from
Jun 11, 2024

Conversation

agarwalhimanshugaya
Copy link
Contributor

@agarwalhimanshugaya agarwalhimanshugaya commented Jun 10, 2024

Related Issue

Fix: #835

Description

I add some of the solution between 3000-3010 which is solved by mine

Type of PR

  • Bug fix
  • Feature enhancement
  • Documentation update
  • Other (specify): _______________

Screenshots / Videos (if applicable)

[Attach any relevant screenshots or videos demonstrating the changes]

Checklist

  • I have performed a self-review of my code.
  • I have read and followed the Contribution Guidelines.
  • I have tested the changes thoroughly before submitting this pull request.
  • I have provided relevant issue numbers, screenshots, and videos after making the changes.
  • I have commented my code, particularly in hard-to-understand areas.

Additional Context

[Include any additional information or context that might be helpful for reviewers.]

Resources for Guidance

Here are some resources that may be helpful as you contribute to CodeHarborHub:

Resources for DSA Features on Our Site:

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there! 👋 Thank you for submitting your pull request to CodeHarborHub. Great job on the contribution! 🎉 We appreciate your efforts and our team will review it soon. If you have any questions or need further assistance, feel free to reach out. Keep up the great work!

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, @agarwalhimanshugaya! 🎉 Thank you for submitting your pull request to CodeHarborHub. We appreciate your contribution and enthusiasm! Our team will review it soon. If you have any questions or need further assistance, feel free to reach out. Thanks for contributing!

Copy link
Contributor

deepsource-io bot commented Jun 10, 2024

Here's the code health analysis summary for commits d39a024..bcd17f2. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@ajay-dhangar ajay-dhangar added documentation Improvements or additions to documentation GSSOC'24 GirlScript Summer of Code | Contributor level1 GirlScript Summer of Code | Contributor's Levels gssoc GirlScript Summer of Code | Contributor level2 GirlScript Summer of Code | Contributor's Levels and removed level1 GirlScript Summer of Code | Contributor's Levels labels Jun 10, 2024
Copy link
Member

@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 all files code base on one files suggestion and can't delete dsa-solutions/lc-solutions/_category_.json this file and you need write good format for all files based on suggestions


- **Input:** $dimensions = [[9,3],[8,6]]$
- **Output:** $48$
- **Explanation:** $For index = 0, length = 9 and width = 3. Diagonal length = sqrt(9 * 9 + 3 * 3) = sqrt(90) ≈ 9.487.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace

$For index = 0, length = 9 and width = 3. Diagonal length = sqrt(9 * 9 + 3 * 3) = sqrt(90) ≈ 9.487.
For index = 1, length = 8 and width = 6. Diagonal length = sqrt(8 * 8 + 6 * 6) = sqrt(100) = 10.
So, the rectangle at index 1 has a greater diagonal length therefore we return area = 8 * 6 = 48..$

to

For index = $0$, $\text{length} = 9$ and width = $3$. $\text{Diagonal length} = sqrt(9 \times 9 + 3 \times 3) = sqrt(90) ≈ 9.487$.
For $\text{index} = 1$, $length = 8$ and $\text{width} = 6$. $\text{Diagonal length} = sqrt(8 \times 8 + 6 \times 6) = sqrt(100) = 10$.
So, the rectangle at index 1 has a greater diagonal length therefore we return $area = 8 \times 6 = 48..$


### Constraints

- $1 <= dimensions.length <= 100$
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace $1 <= dimensions.length <= 100$ to $1 \leq dimensions.length \leq 100$


### Conclusion

At last we can say that we can calculate maximum area of diagonal rectangle using timecomplexity of o(n) and spacecomplexity of o(1) using a simple for loop and some variable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace o(n) to $O(n)$

@agarwalhimanshugaya
Copy link
Contributor Author

i apply all your given suggestions

Copy link
Member

@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.

now update code and focus on code because it is based on mdx + React.

@agarwalhimanshugaya
Copy link
Contributor Author

i remove all the error mention by you

Copy link
Member

@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 only one error

Copy link
Member

@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.

...

Copy link
Member

@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 code based on suggestions

@agarwalhimanshugaya
Copy link
Contributor Author

mai push krrtha tha to nhi horha tha to muje merge krna pda origin k sath

@ajay-dhangar
Copy link
Member

mai push krrtha tha to nhi horha tha to muje merge krna pda origin k sath

okay

Copy link
Member

@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.

Done

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Member

@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.

...

@ajay-dhangar ajay-dhangar merged commit 41c9a24 into codeharborhub:main Jun 11, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation gssoc GirlScript Summer of Code | Contributor GSSOC'24 GirlScript Summer of Code | Contributor level2 GirlScript Summer of Code | Contributor's Levels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add solution of lc question 3000 to 3010
2 participants