diff --git a/Longest-Palindromic-Substring.py b/Longest-Palindromic-Substring.py new file mode 100644 index 000000000..5b8c6e38c --- /dev/null +++ b/Longest-Palindromic-Substring.py @@ -0,0 +1,14 @@ +class Solution: + def longestPalindrome(self, s: str) -> str: + def expand_from_center(left: int, right: int) -> str: + while left >= 0 and right < len(s) and s[left] == s[right]: + left -= 1 + right += 1 + return s[left + 1:right] + longest = "" + for i in range(len(s)): + odd = expand_from_center(i, i) + even = expand_from_center(i, i + 1) + longest = max(longest, odd, even, key=len) + + return longest diff --git a/README.md b/README.md index fae8e43a1..42a3b3a08 100644 --- a/README.md +++ b/README.md @@ -1,73 +1,107 @@ -# Hactoberfest 2024 - -A beginner-friendly project to help you in open-source contribution. Made specifically for contribution in HACKTOBERFEST 2024! Hello World Programs and Algorithms! Please leave a star to support this project! -![](https://hacktoberfest.digitalocean.com/_nuxt/img/logo-hacktoberfest-full.f42e3b1.svg) +# ๐ŸŽ‰ Hacktoberfest 2025 + + -# This All programs For beginner -Enjoy All -Hacktoberfest has a simple and plain moto. +A beginner-friendly project to help you get started with **open-source contributions** โ€” made especially for **Hacktoberfest 2025**! +Submit your Hello World programs and beginner algorithms โ€” and donโ€™t forget to โญ **star this repository** to support the project. -# Beginner-Hacktoberfest -Need Your first pr for hacktoberfest 2k23 ? come on in +![](https://hacktoberfest.digitalocean.com/_nuxt/img/logo-hacktoberfest-full.f42e3b1.svg) --- -# โ“ What's Hacktoberfest 2024? -Hacktoberfest is the easiest way to get into open source! Hacktoberfest is a month long festival of open source code presented by [Digital Ocean](https://www.digitalocean.com/) and [DEV](https://www.dev.to/) this year in 2023. +## ๐ŸŒฑ For Beginners + +This repository contains beginner-friendly programs and sample projects. +Enjoy learning and contributing โ€” Hacktoberfest has a simple and plain motto: + +> **Support open source and grow together.** -During the entire month of October 2022, all you have to do is contribute to any open source projects and open at least 4 pull requests. Yes, any project and any kind of contributions. It can be a be a bug fix, improvement, or even a documentation change! And win a T-Shirt and awesome stickers. +--- + +## ๐Ÿ’ป Beginner-Hacktoberfest -If youโ€™ve never contributed to open source before, this is the perfect time to get started because Hacktoberfest provides a large list of available contribution opportunities (and yes, there are always plenty for beginners too). +Need your first PR for **Hacktoberfest 2025**? Come on in! ๐Ÿš€ --- -# ๐Ÿ‘• Why Should I Contribute? +## โ“ What's Hacktoberfest 2025? -Hacktoberfest has a simple and plain moto. +**Hacktoberfest** is the easiest way to start contributing to open source! +Itโ€™s a **month-long celebration of open source** presented by [DigitalOcean](https://www.digitalocean.com/) and [DEV](https://dev.to/). -> Support open source and earn a limited edition T-shirt! +During **October 2025**, all you have to do is: +- Contribute to open source projects ๐Ÿง‘โ€๐Ÿ’ป +- Open **at least 4 pull requests** +- Earn awesome **swag (T-shirt + stickers)** ๐ŸŽ -So, yes! You can win a T-Shirt and few awesome stickers to attach on your laptop. On plus side, you will get into beautiful world of open source and get the international exposure. -**Wait there's more!** +Your contributions can be: +- Bug fixes ๐Ÿ› +- Improvements or features โš™๏ธ +- Documentation updates ๐Ÿ“ +If youโ€™re new to open source, Hacktoberfest is the perfect time to start โ€” there are always plenty of **beginner-friendly issues** to work on! --- -# ๐Ÿ‘ This is Awesome! How Can I Contribute? +## ๐Ÿ‘• Why Should I Contribute? -It's very easy. You don't need to be an expert in coding and programming. Here are the steps you need to follow to create your -(maybe)- EXAMPLE first pull request within few minutes. -1. **Star this repository.** -2. **Navigate To index.html or main.css do so crazy contribution file** -3. **Edit the file and insert the line of text in the specified location in the format as given in comment .** -4. **Now click on Propose button.** -5. **Create a new pull request.** -6. **Wait for your Pull Request to be reviewed and merged!** -7. **Enjoy and welcome to Hacktoberfest 2023 and Keep Contributing :)** +Hacktoberfestโ€™s simple motto: -> You Can Upload Coded Projects In the Codes Directory +> **Support open source and earn a limited edition T-shirt! ๐Ÿ‘•** +By participating, youโ€™ll: +- Get cool swag ๐ŸŽ +- Learn new coding skills ๐Ÿ’ก +- Gain exposure to the open-source world ๐ŸŒ +- Join an amazing developer community ๐Ÿค --- -## Code Of Conduct -**Examples of behavior that contributes to creating a positive environment :** -- Using welcoming and inclusive language -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Being respectful of differing viewpoints and experiences +## ๐Ÿ‘ How Can I Contribute? + +You donโ€™t need to be an expert to contribute! +Follow these easy steps to make your **first pull request**: +1. โญ **Star this repository.** +2. ๐Ÿงญ **Navigate** to a file like `index.html` or `main.css`. +3. โœ๏ธ **Edit** the file and add your code as instructed in comments. +4. ๐Ÿ’พ **Click on โ€œPropose changes.โ€** +5. ๐Ÿ” **Create a pull request (PR).** +6. โœ… **Wait for it to be reviewed and merged!** +7. ๐ŸŽ‰ **Enjoy and welcome to Hacktoberfest 2025 โ€” keep contributing!** + +> You can also upload your coded projects to the **Codes** directory. -**Examples of unacceptable behavior by participants include:** -- Trolling, insulting/derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or electronic address, without explicit permission --- -## ๐ŸŽฏObjectives -**The Main Objectives of this Repositry is to help People for their Contribution in Hacktoberfest 2022** +## ๐Ÿงญ Code of Conduct + +### โœ… Positive Behavior +- Use welcoming and inclusive language +- Accept constructive criticism gracefully +- Focus on whatโ€™s best for the community +- Be respectful of different viewpoints - - + + +--> +