wingkwong / leetcode-the-hard-way

LeetCode The Hard Way - From Absolute Beginner to Quitter. Join Discord: https://discord.com/invite/Nqm4jJcyBf
https://linktr.ee/leetcodethehardway
844 stars 214 forks source link

Add Manacher's Algorithm #653

Closed abhiramtilakiiit closed 9 months ago

abhiramtilakiiit commented 9 months ago

fixes #71

Change Summary

Checklist

If you haven't fulfilled the below requirements or even delete the entire checklist, your PR won't be reviewed and will be closed without notice. Regular contributors (with 10+ PRs) can skip this part.

General

Tutorial

Solutions

abhiramtilakiiit commented 9 months ago

Alright, I've done the following changes:

  1. My bad, function name was still longest_palindrome, fixed it.
  2. Added spaces around operators
  3. I don't really understand what you mean by that, odd or even my algo inserts '#'s between each character
  4. Added template, and linked to it in the tutorial
abhiramtilakiiit commented 9 months ago

I added the template code in function, but a more general case than just 'longest palindrome'. I return set of all palindromic strings

abhiramtilakiiit commented 9 months ago

I'll fine tune a bit later.

Alright, Thank You