Tip 1 : Have some projects.
Tip 2 : Do a course from Coding Ninjas.
Tip 1 : Keep it short.
Tip 2 : Do not put false things.
Timing was 9 PM. Platform was not good. Platform was very lagging so overall it was bad experience.
str = "ababc"
The longest palindromic substring of "ababc" is "aba", since "aba" is a palindrome and it is the longest substring of length 3 which is a palindrome.
There is another palindromic substring of length 3 is "bab". Since starting index of "aba" is less than "bab", so "aba" is the answer.
1. You do not need to fix the output up to 6 decimal places. it has already been taken care of. Just return the output in the data type mentioned in the function.
2. Lines ‘AB’ and ‘PQ’ are two different lines.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you create a function in JavaScript?