Post, Code and Quiet Time.
  • Home
Sign in Subscribe

Manacher

A collection of 1 post
Manacher

Longest Palindromic Sub-string

Question: find longest palindromic substring. Answer: #include #include #include using namespace std; /* 0~9, a~z, A~z */ void randstring(int n, char* s) { int fn = rand() % n; if (fn <= n/2) fn = (n+1) / 2; for (int i = 0; i < fn; i++) { int t = rand() % 3; char c; if
Nov 1, 2017 1 min read
Page 1 of 1
Post, Code and Quiet Time. © 2023
Powered by Ghost