3031. Minimum Time to Revert Word to Initial State II | Weekly Leetcode 383

preview_player
Показать описание

*************************************************

*************************************************
Timestamps -

00:00 - Agenda
00:40 - Problem Description
03:00 - How many operations are required with just rotations?
05:32 - [Optimisation 1] Using power "replace with any char"
07:30 - [Optimisation 1] Dry run of Algorithm
11:20 - [Optimisation 2] Do not touch some characters (if possible)
15:25 - [Optimisation 2] Dry run of Algorithm
17:30 - [Brute force] Time Complexity
19:25 - Optimising using Hashing
20:57 - Code Walkthrough

*************************************************
Interview Experiences Playlists -

*********************************************************************

Please show support and subscribe if you find the content useful.
Рекомендации по теме
Комментарии
Автор

From the last 3 months Leetcode has raised the level of its contests. And from the past one month, even the 2nd question is coming difficult that it is very tough to even attempt it.

CodingJoySoul
Автор

You have been so helpful to me in understanding hard problems. I appreciate you a lot! Thank you

vishalkron
Автор

you explantation magically makes the problem look easy

raviteja
Автор

Excellent solution !!
Can you please suggest similar problems for practice ?

gsaivishal
Автор

Don't we also need to check if prefix equals suffix even when the hash value is same ? as we do usually in rolling hash

AshutoshChoudhary
Автор

Can you tell why we are multiplying with p_pow[j] in already have the hash values in the prefix_hash array

doodlydoodlydoo
Автор

ye prefix hashing kaha se sikhu?? anyone plzz help

rishav
join shbcf.ru