String algorithms in javascript

Ranuj Mahajan
Jan 31, 2021
  1. calculate all the prefix string in JavaScript
  2. calculate all the suffix string in JavaScript
  3. Check whether string in palindrome in JavaScript

What are prefixes of string in“maradona’

  • all Prefixes of Maradona are : m,ma,mar,mara, marad, marado, maradon, maradona, ’ ’ .
  • Proper prefixes of Maradona are :M, ma,mar,mara, marad, marado, maradon.

What are suffixes of string in“maradona’

  • all the suffixes of maradona are : maradona, maradon, marado,marad,mara,mar,ma, m, ‘ ‘.
  • Proper suffixes of Maradona are :M, ma,mar,mara, marad, marado, maradon.

what is palindrome string : string which is same when reversed is palindrom string. example : aabbcbbaa, nitin.

--

--

Ranuj Mahajan

I am curious mind. i am very simple human being in this complicated consiousness. i try to explain concepts of computers and life in simple and precise manner.