Skip to content

Instantly share code, notes, and snippets.

@PranayPant
PranayPant / leetcode.py
Created March 8, 2019 17:45
Manacher's Algorithm in Python
def manachers( S ):
"""
O(n) algorithm to find longest palindrome substring
:param S: string to process
:return: longest palindrome
"""
# Create a copy of array with sentinel chars in between and around
# Also include space for starting and ending nodes
@PranayPant
PranayPant / portfolio-coverage.json
Last active December 6, 2025 06:28
Portfolio Coverage Badge
{"label":"Coverage","message":"100%","schemaVersion":1,"color":"brightgreen"}