├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CONTRIBUTORS.txt ├── LICENSE ├── README.md └── learn.md /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | . 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, 4 | email, or any other method with the owners of this repository before making a change. 5 | 6 | Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. 7 | 8 | ## Pull Request Process 9 | 10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a 11 | build. 12 | 2. Update the README.md with details of changes to the interface, this includes new environment 13 | variables, exposed ports, useful file locations and container parameters. 14 | 3. Increase the version numbers in any examples files and the README.md to the new version that this 15 | Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). 16 | 4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you 17 | do not have permission to do that, you may request the second reviewer to merge it for you. 18 | -------------------------------------------------------------------------------- /CONTRIBUTORS.txt: -------------------------------------------------------------------------------- 1 | 1. @Kjur0 2 | 7. @Kjur0 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Breno A. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Algorithm Challenges 2 | 3 | > [!IMPORTANT] 4 | > This repository contains a collection of coding challenges with solutions, including links to LeetCode and LintCode problems. Whether you're a beginner or an experienced coder, these challenges are designed to enhance your problem-solving skills and algorithmic thinking. 5 | 6 | ## Getting Started 7 | 8 | - Each challenge is categorized by difficulty: Easy, Medium, or Hard. 9 | - Click on the LeetCode or LintCode links to access the problem statement and submit your solution. 10 | - Solutions are provided in this repository (resources folder) to help you learn and compare your approach. (if missing, feel free to open an issue or pull request) 11 | 12 | ## Challenges Table 13 | 14 | | Name | Link | Difficulty | Resolution | 15 | |------|------|------------|------------| 16 | | 1. Two Sum | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/two-sum) | easy | [Two Sum Solution](https://leetcode.com/problems/two-sum/solutions/4988795/two-sum) by @Kjur0 17 | | 2. Add Two Numbers | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/add-two-numbers) | medium | 18 | | 4. Median of Two Sorted Arrays | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/median-of-two-sorted-arrays) | hard | 19 | | 5. Longest Palindromic Substring | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/longest-palindromic-substring) | medium | 20 | | 7. Reverse Integer | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/reverse-integer) | medium | [Reverse Integer Solution](https://leetcode.com/problems/reverse-integer/solutions/4989071/reverse-integer) by @Kjur0 21 | | 11. Container With Most Water | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/container-with-most-water) | medium | 22 | | 12. Integer to Roman | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/integer-to-roman) | medium | 23 | | 13. Roman to Integer | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/roman-to-integer) | easy | 24 | | 14. Longest Common Prefix | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/longest-common-prefix) | easy | 25 | | 15. 3Sum | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/3sum) | medium | 26 | | 18. 4Sum | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/4sum) | medium | 27 | | 20. Valid Parentheses | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/valid-parentheses) | easy | 28 | | 21. Merge Two Sorted Lists | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/merge-two-sorted-lists) | easy | 29 | | 22. Generate Parentheses | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/generate-parentheses) | medium | 30 | | 23. Merge k Sorted Lists | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/merge-k-sorted-lists) | hard | 31 | | 25. Reverse Nodes in k-Group | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/reverse-nodes-in-k-group) | hard | 32 | | 27. Remove Element | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/remove-element) | easy | 33 | | 31. Next Permutation | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/next-permutation) | medium | 34 | | 33. Search in Rotated Sorted Array | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/search-in-rotated-sorted-array) | medium | 35 | | 35. Search Insert Position | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/search-insert-position) | easy | 36 | | 48. Rotate Image | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/rotate-image) | medium | 37 | | 52. N-Queens II | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/n-queens-ii) | hard | 38 | | 55. Jump Game | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/jump-game) | medium | 39 | | 56. Merge Intervals | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/merge-intervals) | medium | 40 | | 57. Insert Interval | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/insert-interval) | medium | 41 | | 62. Unique Paths | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/unique-paths) | medium | 42 | | 68. Text Justification | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/text-justification) | hard | 43 | | 78. Subsets | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/subsets) | medium | 44 | | 86. Partition List | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/partition-list) | medium | 45 | | 88. Merge Sorted Array | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/merge-sorted-array) | easy | 46 | | 104. Maximum Depth of Binary Tree | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/maximum-depth-of-binary-tree) | easy | 47 | | 121. Best Time to Buy and Sell Stock | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/best-time-to-buy-and-sell-stock) | easy | 48 | | 128. Longest Consecutive Sequence | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/longest-consecutive-sequence) | medium | 49 | | 136. Single Number | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/single-number) | easy | 50 | | 137. Single Number II | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/single-number-ii) | medium | 51 | | 146. LRU Cache | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/lru-cache) | medium | 52 | | 185. Department Top Three Salaries | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/department-top-three-salaries) | hard | 53 | | 189. Rotate Array | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/rotate-array) | medium | 54 | | 198. House Robber | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/house-robber) | medium | 55 | | 207. Course Schedule | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/course-schedule) | medium | 56 | | 210. Course Schedule II | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/course-schedule-ii) | medium | 57 | | 213. House Robber II | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/house-robber-ii) | medium | 58 | | 217. Contains Duplicate | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/contains-duplicate) | easy | 59 | | 239. Sliding Window Maximum | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/sliding-window-maximum) | hard | 60 | | 253. Meeting Rooms II | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/meeting-rooms-ii) [![Static Badge](https://img.shields.io/badge/LintCode--Link?style=plastic&label=LintCode&labelColor=%2313b4ff&color=%2313b4ff)](https://www.lintcode.com/problem/919) | medium | 61 | | 258. Add Digits | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/add-digits) | easy | 62 | | 283. Move Zeroes | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/move-zeroes) | easy | 63 | | 300. Longest Increasing Subsequence | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/longest-increasing-subsequence) | medium | 64 | | 312. Burst Balloons | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/burst-balloons) | hard | 65 | | 329. Longest Increasing Path in a Matrix | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/longest-increasing-path-in-a-matrix) | hard | 66 | | 359. Logger Rate Limiter | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/logger-rate-limiter) [![Static Badge](https://img.shields.io/badge/LintCode--Link?style=plastic&label=LintCode&labelColor=%2313b4ff&color=%2313b4ff)](https://www.lintcode.com/problem/3620) | easy | 67 | | 384. Shuffle an Array | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/shuffle-an-array) | medium | 68 | | 394. Decode String | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/decode-string) | medium | 69 | | 402. Remove K Digits | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/remove-k-digits) | medium | 70 | | 424. Longest Repeating Character Replacement | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/longest-repeating-character-replacement) | medium | 71 | | 427. Construct Quad Tree | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/construct-quad-tree) | medium | 72 | | 540. Single Element in a Sorted Array | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/single-element-in-a-sorted-array) | medium | 73 | | 542. 01 Matrix | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/01-matrix) | medium | 74 | | 567. Permutation in String | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/permutation-in-string) | medium | 75 | | 685. Redundant Connection II | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/redundant-connection-ii) | hard | 76 | | 692. Top K Frequent Words | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/top-k-frequent-words) | medium | 77 | | 715. Range Module | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/height-of-binary-tree-after-subtree-removal-queries) | hard | 78 | | 759. Employee Free Time | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/employee-free-time) [![Static Badge](https://img.shields.io/badge/LintCode--Link?style=plastic&label=LintCode&labelColor=%2313b4ff&color=%2313b4ff)](https://www.lintcode.com/problem/850) | hard | 79 | | 818. Race Car | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/race-car) | hard | 80 | | 837. New 21 Game | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/new-21-game) | medium | 81 | | 843. Guess the Word | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/guess-the-word) | hard | 82 | | 844. Backspace String Compare | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/backspace-string-compare) | easy | 83 | | 862. Shortest Subarray with Sum at Least K | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k) | hard | 84 | | 875. Koko Eating Bananas | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/koko-eating-bananas) | medium | 85 | | 934. Shortest Bridge | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/shortest-bridge) | medium | 86 | | 938. Range Sum of BST | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/range-sum-of-bst) | easy | 87 | | 958. Check Completeness of a Binary Tree | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/check-completeness-of-a-binary-tree) | medium | 88 | | 974. Subarray Sums Divisible by K | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/subarray-sums-divisible-by-k) | medium | 89 | | 975. Odd Even Jump | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/odd-even-jump) | hard | 90 | | 1011. Capacity To Ship Packages Within D Days | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/capacity-to-ship-packages-within-d-days) | medium | 91 | | 1101. The Earliest Moment When Everyone Become Friends | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/the-earliest-moment-when-everyone-become-friends) [![Static Badge](https://img.shields.io/badge/LintCode--Link?style=plastic&label=LintCode&labelColor=%2313b4ff&color=%2313b4ff)](https://www.lintcode.com/problem/3670) | medium | 92 | | 1110. Delete Nodes And Return Forest | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/delete-nodes-and-return-forest) | medium | 93 | | 1136. Parallel Courses | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/parallel-courses) [![Static Badge](https://img.shields.io/badge/LintCode--Link?style=plastic&label=LintCode&labelColor=%2313b4ff&color=%2313b4ff)](https://www.lintcode.com/problem/3673) | medium | 94 | | 1148. Article Views I | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/article-views-i) | easy | 95 | | 1207. Unique Number of Occurrences | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/unique-number-of-occurrences) | easy | 96 | | 1249. Minimum Remove to Make Valid Parentheses | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses) | medium | 97 | | 1254. Number of Closed Islands | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/number-of-closed-islands) | medium | 98 | | 1376. Time Needed to Inform All Employees | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/time-needed-to-inform-all-employees) | medium | 99 | | 1480. Running Sum of 1d Array | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/running-sum-of-1d-array) | easy | 100 | | 1514. Path with Maximum Probability | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/path-with-maximum-probability) | medium | 101 | | 1639. Number of Ways to Form a Target String Given a Dictionary | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/number-of-ways-to-form-a-target-string-given-a-dictionary) | hard | 102 | | 1672. Richest Customer Wealth | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/richest-customer-wealth) | easy | 103 | | 1768. Merge Strings Alternately | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/merge-strings-alternately) | easy | 104 | | 1803. Count Pairs With XOR in a Range | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/count-pairs-with-xor-in-a-range) | hard | 105 | | 1834. Single-Threaded CPU | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/single-threaded-cpu) | medium | 106 | | 1857. Largest Color Value in a Directed Graph | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/largest-color-value-in-a-directed-graph) | hard | 107 | | 1971. Find if Path Exists in Graph | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/find-if-path-exists-in-graph) | easy | 108 | | 2007. Find Original Array From Doubled Array | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/find-original-array-from-doubled-array) | medium | 109 | | 2101. Detonate the Maximum Bombs | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/detonate-the-maximum-bombs) | medium | 110 | | 2332. The Latest Time to Catch a Bus | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/the-latest-time-to-catch-a-bus) | medium | 111 | | 2402. Metting Rooms III | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/meeting-rooms-iii) | hard | 112 | | 2407. Longest Increasing Subsequence II | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/longest-increasing-subsequence-ii) | hard | 113 | | 2448. Minimum Cost to Make Array Equal | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/minimum-cost-to-make-array-equal) | hard | 114 | | 2458. Height of Binary Tree After Subtree Removal Queries | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/height-of-binary-tree-after-subtree-removal-queries) | hard | 115 | | 2667. Create Hello World Function | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/create-hello-world-function) | easy | 116 | | 2713. Maximum Strictly Increasing Cells in a Matrix | [![Static Badge](https://img.shields.io/badge/LeetCode--Link?style=plastic&logo=leetcode&logoColor=%23FFA116&label=LeetCode&labelColor=%23373737&color=%23373737)](https://leetcode.com/problems/maximum-strictly-increasing-cells-in-a-matrix) | hard | 117 | 118 | ## Contributing 119 | 120 | If you'd like to contribute more challenges, solutions, or improvements to the README, feel free to open a pull request. Your contributions are highly appreciated! 121 | 122 | Happy coding! 💻✨ 123 | -------------------------------------------------------------------------------- /learn.md: -------------------------------------------------------------------------------- 1 | # Algorithm Challenges Learning Guide 2 | 3 | Welcome to the Algorithm Challenges Learning Guide! This guide aims to provide you with resources and tips to enhance your problem-solving skills and algorithmic thinking through tackling coding challenges. 4 | 5 | ## Getting Started 6 | 7 | ### Understanding the Structure 8 | 9 | Each challenge in the repository is categorized by difficulty: Easy, Medium, or Hard. Challenges are sourced from platforms like LeetCode and LintCode, providing you with a diverse range of problems to solve. 10 | 11 | ### Accessing Problem Statements 12 | 13 | You can access the problem statements by clicking on the LeetCode or LintCode links provided in the challenges table. These links will direct you to the respective platforms where you can read the problem description and submit your solution. 14 | 15 | ### Finding Solutions 16 | 17 | Solutions to the challenges are provided in this repository under the `resources` folder. If a solution is missing, you can contribute by opening an issue or pull request to add it. 18 | 19 | ## How to Use This Guide Effectively 20 | 21 | ### Beginner Level 22 | 23 | If you're new to coding challenges and algorithmic problem-solving, start with challenges categorized as Easy. These problems often cover fundamental concepts and are designed to help you grasp basic algorithms and data structures. 24 | 25 | ### Intermediate Level 26 | 27 | Once you're comfortable with solving Easy challenges, move on to Medium difficulty challenges. These problems require a deeper understanding of algorithms and may involve more complex data structures. 28 | 29 | ### Advanced Level 30 | 31 | For seasoned coders looking for a challenge, the Hard difficulty challenges are perfect. These problems often require advanced algorithmic techniques and may involve optimization and efficient solutions. 32 | 33 | ### Practice Regularly 34 | 35 | Consistency is key to improving your problem-solving skills. Set aside time each day or week to practice solving coding challenges. Gradually increase the difficulty level as you progress. 36 | 37 | ### Analyze Solutions 38 | 39 | After attempting a challenge, take time to analyze different solutions, including those provided in the repository. Understand the approach, algorithms, and data structures used. Experiment with variations of the solutions to deepen your understanding. 40 | 41 | ### Collaborate and Seek Help 42 | 43 | Don't hesitate to seek help from online communities, forums, or mentors if you get stuck on a problem. Collaborating with others and discussing various approaches can provide valuable insights and accelerate your learning. 44 | 45 | ### Track Your Progress 46 | 47 | Keep track of the challenges you've solved and your improvement over time. Celebrate your successes and learn from your mistakes. Use tools like spreadsheets or online platforms to monitor your progress. 48 | --------------------------------------------------------------------------------