Minimum string coefficient — Hackerrank

Правка en3, от jd_sal, 2020-04-29 15:46:25

I am not able to understand the solution of the last problem from Hack the interview II -Global, a contest on Hackerrank which finished few days ago.It's labelled 'HARD'.

Problem Link : (https://www.hackerrank.com/contests/hack-the-interview-ii-global/challenges/flipped-beauty/problem)

Solution Link : (https://www.hackerrank.com/rest/contests/hack-the-interview-ii-global/challenges/flipped-beauty/hackers/izban/download_solution)

Solution by Errichto : (https://www.hackerrank.com/rest/contests/hack-the-interview-ii-global/challenges/flipped-beauty/hackers/Errichto/download_solution)

I don't get what is len = m-2-2*p in the first solution ? Although both the solutions are same.

It will be really helpful if someone explains me the solution. Thanks!

Теги string, #hard

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский jd_sal 2020-04-29 15:46:25 72
en2 Английский jd_sal 2020-04-29 15:45:28 12
en1 Английский jd_sal 2020-04-29 15:44:54 746 Initial revision (published)