Total Characters in String After Transformations II | Binary Exponentiation | Leetcode 3337 | MIK

Subscribers:
105,000
Published on ● Video Link: https://www.youtube.com/watch?v=MGu9Zr5RFtg



Duration: 0:00
4,492 views
258


Whatsapp Community Link : https://www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A

Matrix Exponentiation | n Degree Linear Recurrence -    • Matrix Exponentiation | n Degree Line...  

Hi Everyone, this is the 30th video of our Playlist "Maths Playlist : Popular Interview Problems".
Now we will be solving an expert level Maths problem - Total Characters in String After Transformations II | Detailed Explanation | Using Binary Exponentiation | Leetcode 3337 | codestorywithMIK

We will break it down into simple steps to make it easier to understand. We will deep dive into the Maths behind it.

Problem Name : Total Characters in String After Transformations II | Detailed Explanation | Using Binary Exponentiation | Leetcode 3337 | codestorywithMIK
Company Tags :
My solutions on Github(C++ & JAVA) - https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/Mathematical/Total Characters in String After Transformations II.cpp
Leetcode Link : https://leetcode.com/problems/total-characters-in-string-after-transformations-ii


My DP Concepts Playlist :    • Roadmap for DP | How to Start DP ? | ...  
My Graph Concepts Playlist :    • Graph Concepts & Qns - 1 : Graph will...  
My Segment Tree Concepts Playlist :    • Segment Tree | Introduction | Basics ...  
My Recursion Concepts Playlist :    • Introduction | Recursion Concepts And...  
Trie Playlist -    • Word Search II (Google, Amazon, Meta,...  
Difference Array Technique: Concepts & Qns :    • Introduction | What | How | Differenc...  
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Twitter : https://twitter.com/CSwithMIK
Subscribe to my channel :    / @codestorywithmik  

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝


Video Summary :
The approach models character transformations as a matrix where each element tracks transitions between letters. Repeated transformations are handled efficiently using matrix exponentiation, similar to fast exponentiation. The character frequency of the initial string is treated as a vector, which is transformed using the powered matrix. This avoids simulating each step, achieving logarithmic time complexity with respect to the number of transformations.

✨ Timelines✨
00:00 - Introduction
0:42 - Motivation
0:55 - Problem Explanation
6:00 - Thought Process
7:30 - Finding Relation with Matrix Exponentiation
12:26 - How to find T Matrix ?
23:12 - Code for filling T Matrix
27:58 - Why power is t ?
30:40 - Finding T * initial_freqency vector
35:47 - Coding it up

#MIK #mik #Mik
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #coding #programming #100daysofcode #developers #techjobs #datastructures #algorithms #webdevelopment #softwareengineering #computerscience #pythoncoding #codinglife #coderlife #javascript #datascience #leetcode #leetcodesolutions #leetcodedailychallenge #codinginterview #interviewprep #technicalinterview #interviewtips #interviewquestions #codingchallenges #interviewready #dsa #hindi #india #hindicoding #hindiprogramming #hindiexplanation #hindidevelopers #hinditech #hindilearning #helpajobseeker #jobseekers #jobsearchtips #careergoals #careerdevelopment #jobhunt #jobinterview #github #designthinking #learningtogether #growthmindset #digitalcontent #techcontent #socialmediagrowth #contentcreation #instagramreels #videomarketing #codestorywithmik #codestorywithmick #codestorywithmikc #codestorywitmik #codestorywthmik #codstorywithmik #codestorywihmik #codestorywithmiik #codeistorywithmik #codestorywithmk #codestorywitmick #codestorymik #codestorwithmik




Other Videos By codestorywithMIK


2025-05-23Can you guess ?
2025-05-22Interviewer : Bhai kitni salary loge 🥺
2025-05-21Set Matrix Zeroes | Multiple Approaches | Leetcode 73 | codestorywithMIK
2025-05-20Array k aaage koi bol sakta hai kya | codestorywithMIK
2025-05-19Zero Array Transformation I | Brute Force | Optimal | Leetcode 3356 | codestorywithMIK
2025-05-18Type of Triangle | Simple Explanation | Leetcode 3024 | codestorywithMIK
2025-05-18Painting a Grid With Three Different Colors | Thought Process | Leetcode 1931 | codestorywithMIK
2025-05-15Longest Unequal Adjacent Groups Subsequence II | Why Greedy Fails | Leetcode 2901 | codestorywithMIK
2025-05-15Print Longest Increasing Subsequence | LIS | Detailed Dry Run | Why It is Special |codestorywithMIK
2025-05-14Longest Unequal Adjacent Groups Subsequence I | Simple Intuition | Leetcode 2900 | codestorywithMIK
2025-05-14Total Characters in String After Transformations II | Binary Exponentiation | Leetcode 3337 | MIK
2025-05-14Matrix Exponentiation | n Degree Linear Recurrence | Super Detailed | codestorywithMIK
2025-05-12Total Characters in String After Transformations I | Made Easy | Leetcode 3335 | codestorywithMIK
2025-05-11Finding 3-Digit Even Numbers | 2 Simple Approaches | Leetcode 2094 | codestorywithMIK
2025-05-10Three Consecutive Odds | Important Motivation | 2 Approaches | Leetcode 1550 | codestorywithMIK
2025-05-10Dungeon Game | Brute Force | Recursion | Memo | Bottom Up | Leetcode 174 | DP On Grids | MIK
2025-05-10This Is Your Sign to Keep Going |Motivation | codestorywithMIK
2025-05-09Minimum Equal Sum of Two Arrays After Replacing Zeros | Made Easy | Leetcode 2918 | codestorywithMIK
2025-05-09Count Number of Balanced Permutations | Super Detailed Explanation | Leetcode 3343 |codestorywithMIK
2025-05-07Find Minimum Time to Reach Last Room II | Using Same Code | Leetcode 3342 | codestorywithMIK
2025-05-07No Loop Needed | Find Min & Max in 1 Line using STL | C++ Competitive Programming Hack



Other Statistics

Counter-Strike: Source Statistics For codestorywithMIK

At this time, codestorywithMIK has 66,246 views for Counter-Strike: Source spread across 9 videos. Less than an hour worth of Counter-Strike: Source videos were uploaded to his channel, making up less than 0.10% of the total overall content on codestorywithMIK's YouTube channel.