leetcode
leetcode copied to clipboard
update python solution for LC 5 longest palindrome substring
File Modified: 0005-longest-palindromic-substring.py
- Language Used: python
- Submission URL: https://leetcode.com/problems/longest-palindromic-substring/submissions/945080908/
- Reason:
- Optimizing the space complexity: the substring slice operation created extra space. Before O(N) extra space, after O(1) extra space. (Please ignore this PR if the standard practice is to maintain the first solution exactly as the video in the youtube channel despite if it's not the most optimize approach.)
Important
Please make sure the file name is lowercase and a duplicate file does not already exist before merging.