Count minimum Adj swap to make string palindrome | Step by step Solution in Hindi | Java

  Рет қаралды 7,033

Prepare Yourself

Prepare Yourself

3 жыл бұрын

Optimized Solution for Count minimum swap to make string palindrome in Hindi.
#datastructure,
#algorithem,
#computerscience
#prepareyourself
#java
#array
#geeksforgeekssolution
#leetcodesolution
#arraysolutioninhindi
#datastructureinhindi

Пікірлер: 15
@anuragshekhawat2541
@anuragshekhawat2541 Жыл бұрын
Thanks bro it helped a lot 🤟🤟🤟
@ROHITKADYANJI
@ROHITKADYANJI Жыл бұрын
Excellent explanations bro keep it up!!!!!
@prepareyourself7992
@prepareyourself7992 Жыл бұрын
Thanks a lot! Keep learning
@A_CupOf_Life
@A_CupOf_Life 2 жыл бұрын
👍👍
@harshvardhanr5062
@harshvardhanr5062 2 жыл бұрын
how does it ensure that the swaps are minimum in number. we are only swapping to match the character at r with the lth character. will there be a case that matching the lth character with rth character will have minimum swaps
@umesh6472
@umesh6472 2 жыл бұрын
this will not give the minimum no. of adjacent swaps. as we are only making a palindrome and not keeping the swaps minimum. In the desired solution we have to check for a minimum of swaps used in making (both chars equal to left and both char equal to right). for example "aabbdccd" to make "daabbccd" it takes 4 swaps and for "abbdccda" it takes 6 swaps choosing the minimum will give us the desired answer as doing the first will give answer 7 and the second will give 10.
@shobhitgarg6897
@shobhitgarg6897 2 жыл бұрын
why we need to swap k and k+1 and how does this step solve problem.
@prepareyourself7992
@prepareyourself7992 2 жыл бұрын
Hi Thanks for bringing this in highlight, Your question is valid actually I have kept title wrong. I will update the title. Please continue watching other videos.
@prepareyourself7992
@prepareyourself7992 2 жыл бұрын
For Counting the minimum swap we can swap k with r. For Example "mamad" minimum adj swap is 3 but minimum swap is 1. We hope we clearifed your doubt.
@akjokeesblog7932
@akjokeesblog7932 Жыл бұрын
Can we cout the palisrome string
@prepareyourself7992
@prepareyourself7992 Жыл бұрын
yes
@Yash-uk8ib
@Yash-uk8ib 2 жыл бұрын
how is this working for "mamad"
@prepareyourself7992
@prepareyourself7992 2 жыл бұрын
Hi Yash, for "mamad" minimum adj swaps to make it palindrome will be 3 but minimum swap is 1.
@shivaprogaming656
@shivaprogaming656 2 жыл бұрын
Your java IDE is getting stuck
@prepareyourself7992
@prepareyourself7992 2 жыл бұрын
Hey Realy sorry for that, it's a software issue. working on that.
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 4,8 МЛН
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 10 МЛН
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 108 МЛН
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 37 МЛН
Minimum Swaps to sort intuition + code C++ with explanation
15:25
Code with Alisha
Рет қаралды 20 М.
Maximum Product Subarray | LeetCode 152 | C++, Java, Python
18:56
Knowledge Center
Рет қаралды 57 М.
Mastering Generics and Wildcards in Java: Essential Tips and Examples
14:04
Design a Parking lot | Systems Design Interview question
24:35
Coin Change - Dynamic Programming Bottom Up - Leetcode 322
19:23
2193. Minimum Number of Moves to Make Palindrome (Leetcode Hard)
20:17
Programming Live with Larry
Рет қаралды 1,9 М.
Minimum Size Subarray Sum | Leetcode #209
22:10
Techdose
Рет қаралды 30 М.
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 4,8 МЛН