433. Minimum Genetic Mutation

PROBLEM LINK : leetcode.com/problems/minimum...
SOLUTION LINK : github.com/niveditaprity/Leet...

Пікірлер: 36

  • @vivekgupta6696
    @vivekgupta6696 Жыл бұрын

    Explaination so good, Audio Quality and Video Quality also good , Thanks for this !!

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Most welcome!

  • @gigachad2419
    @gigachad2419 Жыл бұрын

    Beautiful Breakdown of Problem and the following Solution 🙏

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Thank you :) must share with your friends

  • @masumali8356
    @masumali83569 ай бұрын

    lovely explanation...thank you.

  • @techadorabynivedita

    @techadorabynivedita

    9 ай бұрын

    You're most welcome

  • @kunalsabadra6802
    @kunalsabadra6802 Жыл бұрын

    I saw lot off vedios from morning but i was still stuck at concept but your explanation cleared all my doubts along with the code . Thanks a lot keep making such content. Always grateful

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Welcome :) , keep watching and must share with your friends

  • @tusharnain6652
    @tusharnain6652 Жыл бұрын

    perfect 👌👌

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Thanks a lot 😊

  • @shivamtiwari4242
    @shivamtiwari4242 Жыл бұрын

    nice dear

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    thank you

  • @AR-py5uk
    @AR-py5uk Жыл бұрын

    Thank you for the clear explanation

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    You are welcome!

  • @techwithrajdeep7633
    @techwithrajdeep7633 Жыл бұрын

    Could you please explain how did you reach to the conclusion of using a dfs approach and is this question from graphs?

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    its a BFS Approach , while doing mutation one by one i find it is similar to find minimum distance between two nodes if we consider each string as a node , and for finding minimum distance between two nodes we use bfs. because before going to next depth we should check each node of curr depth

  • @raushankumar6993
    @raushankumar6993 Жыл бұрын

    thanks again

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Always welcome

  • @vivekgupta6696
    @vivekgupta6696 Жыл бұрын

    Hi, You can use leetcode formatter extention in chrome for formatting the code

  • @tusharnain6652

    @tusharnain6652

    Жыл бұрын

    Woah, didnt knew that. Thank bro.

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    okay , Thank you :)

  • @varunshrivastava2706
    @varunshrivastava2706 Жыл бұрын

    Great video as always, by the way, can you also provide a solution in python3 since it is easy to understand code irrespective of the coding experience any viewer has? Problems related to graphs and DP C++/Java code could be tough to understand for beginners.

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    Thank you :) , will try if you want to contribute, can contribute on github

  • @itonlineacademy
    @itonlineacademy Жыл бұрын

    🙂🙂🙂

  • @rajvardhansingh1000
    @rajvardhansingh1000 Жыл бұрын

    can u share your linkedin profile ?

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    check channel description i provided there

  • @bhushankorg5606
    @bhushankorg5606 Жыл бұрын

    Solved by Myself! came to see your approach. class Solution { public: bool isValid(string s1, string s2){ int cnt = 0; for (int i = 0; i if(s1[i] != s2[i]) cnt++; } return cnt == 1; } int minMutationUtil(string start, string end, vector &bank){ if(start == end) return 0; int minMut = 1e9; for(int i = 0; i string curr = bank[i]; if(isValid(start, curr)){ bank[i] = "00000000"; int mut = 1 + minMutationUtil(curr, end, bank); bank[i] = curr; minMut = min(minMut, mut); } } return minMut; } int minMutation(string start, string end, vector &bank){ int ans = minMutationUtil(start, end, bank); return (ans == 1e9) ? -1 : ans; } };

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    that's great

  • @yashnarkhedkar3734
    @yashnarkhedkar3734 Жыл бұрын

    but why we use BFS here.. I can't getting where to use BFS, DFS..please tell

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    its a BFS Approach , while doing mutation one by one i find it is similar to find minimum distance between two nodes if we consider each string as a node , and for finding minimum distance between two nodes we use bfs. because before going to next depth we should check each node of curr depth

  • @yashnarkhedkar3734

    @yashnarkhedkar3734

    Жыл бұрын

    @@techadorabynivedita yes nivedita its clear i saw another videos on youtube.. From that i get idea how to use BFS DFS

  • @utkarshsaxena7445
    @utkarshsaxena7445 Жыл бұрын

    Detailed code : github.com/utkarsh006/BFS/blob/main/433.%20Minimum%20Genetic%20Mutation.cpp

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    thank you

  • @MR-re8pq
    @MR-re8pq Жыл бұрын

    What is the use of minimum in this Question?

  • @techadorabynivedita

    @techadorabynivedita

    Жыл бұрын

    we can get multiple way to reach "end" string , but ans should be minimum

  • @MR-re8pq

    @MR-re8pq

    Жыл бұрын

    Thanks 👍