I completed 365 days streak today thank you so much bro ❤❤❤❤
@codestorywithMIK Жыл бұрын
Wow 😍😍😍
@CodingJoySoul Жыл бұрын
Wish India gets more such teachers like you.
@codestorywithMIK Жыл бұрын
It means a lot 🙏❤️😇
@saurabhKumar-hj6yp Жыл бұрын
I have solved this question by my own. It only happened due to your videos. Thanks Allot😁😁
@LivewithPawan Жыл бұрын
Thank you bhaiya, exams chl rhe hai but still we can solve podo becoz of you
@DYashwanth-u3j Жыл бұрын
After watching till 10:50. i could able to come up with solution. Thank You bhai
@ashutoshpandey1639 Жыл бұрын
I have also solved with the same approach, thank you so much bhaiya for giving me the confidence to think and solve problems at my own
@iamnoob75933 ай бұрын
What an explanation , Just brilliant
@wearevacationuncoverers Жыл бұрын
I wish I had you in my college as our teacher. you are a gem.
@princekhunt13579 Жыл бұрын
Please make daily videos on daily problem of leetcode. Your hindi explanation is good to understand in ones watch.
@codestorywithMIK Жыл бұрын
Yes I daily post 😇🙏❤️
@thekindspill Жыл бұрын
Perfect explanation. Included almost everything that a beginner would need to crack such problems.
@dayashankarlakhotia4943 Жыл бұрын
first time recursion &bottom up with in one video. in bottom up ma recursion space not count.thanks for great explanation 🎉❤
@CodingJoySoul Жыл бұрын
You are a gem. You taught such a tough question in an easy way.
@codestorywithMIK Жыл бұрын
😇❤️
@prateekgirilateralentry5865 Жыл бұрын
Thanks sir for Video Your clear explanations have significantly enriched my understanding of these concepts. Day : 11 streak continues 😃
@anishhazra2204 Жыл бұрын
bhaiya aap bhot acha explain karte ho
@wearevacationuncoverers Жыл бұрын
it would be great.
@ugcwithaddi Жыл бұрын
LEGEND GOAT . Hats off explanation.
@souravjoshi2293 Жыл бұрын
Fantastic explanation as always. King of DSA
@therealsumitshah Жыл бұрын
I wish everyone teaches to develop the thought process rather than simply giving the solution.
@codestorywithMIK Жыл бұрын
😇🙏❤️
@Pawan-cf5cg Жыл бұрын
Bhiya pls make a video on your thought process that how you come with right approach
@subhadrosamaddar63364 ай бұрын
nice solution
@umeshbisht1054 Жыл бұрын
Thanku bhaiya ❤
@tutuimam3381 Жыл бұрын
Thanks 👍
@wakeuppeggy Жыл бұрын
Thankyou so much !!
@codestorywithMIK Жыл бұрын
You're welcome! 😇🙏❤️
@yashviyadav73298 ай бұрын
Niceeeeee
@Imajay204 Жыл бұрын
I'm request you pls solve contest questions number 4 every contest. Im unable to build logic sometime in q4 .
@codestorywithMIK Жыл бұрын
Here it is - kzbin.info/www/bejne/ipmXm6eEpt-se8Usi=trZnWNdgMVUMS9cu 🙏❤️😇
@Imajay204 Жыл бұрын
@@codestorywithMIK❤❤
@infinitygaming7192 Жыл бұрын
can we take a matrix of 0 to 9 do and add +2 and 1 in all four directions and then if it is out of bond we can return 0 else 1 and return the addittion of the subsequences is my appraoch correct
@RUSTYYYYYYYYY Жыл бұрын
yes
@shivamrathore9762 Жыл бұрын
start for GeeksForGeeks problem of the day also
@surajsidar32804 ай бұрын
When the starting position is 6 how can it go to 0? It is given in the question that it has to go two either vertically first or 2 steps horizontally first. If it starts from 6 then it has to go one steps horizontally and two steps vertically down to reach 0, which is incorrect.
@shreya28643 ай бұрын
but why are we storing the cell?
@dhairyachauhan6622 Жыл бұрын
did on my own with a unique method CODE:- class Solution { public: int mod = (int) 1e9 + 7; int dp[4][3][5001]; int solve(vector&grid,int row,int col,int n){ if(n == 0){ return 1; } if(dp[row][col][n] != -1){ return dp[row][col][n]; } int ans = 0; for(int i = -2;i= 0 && nr
@unknown478964 ай бұрын
i also did by same method bro
@ahaddesirement4594 Жыл бұрын
For 3 my solution gives output 156, but the expected is 46. Can you tell what is wrong with my approach? I mean what are the redundant cases I am taking into count. class Solution { int result = 0; public int knightDialer(int n) { for(int row = 0; row < 3; row++){ for (int col = 0; col < 3; col++){ calculate(row, col, n, 1); } } calculate(3, 1, n, 1); return result; } public void calculate(int row, int col, int n, int digits){ boolean invalidPosition = false; if((col != 1 && (row > 2 || col > 2 || row < 0 || col < 0)) || (col == 1 && (row > 3 || row < 0))){ invalidPosition = true; } if(digits == n){ if(!invalidPosition) result++; return; } calculate(row + 2, col + 1, n, digits + 1); calculate(row - 2, col + 1, n, digits + 1); calculate(row + 1, col + 2, n, digits + 1); calculate(row + 1, col - 2, n, digits + 1); calculate(row + 2, col - 1, n, digits + 1); calculate(row - 2, col - 1, n, digits + 1); calculate(row - 1, col + 2, n, digits + 1); calculate(row - 1, col - 2, n, digits + 1); } }
@ahaddesirement459411 ай бұрын
I have fixed it, thanks: class Solution { Integer[][][] memo; int mod = 1000000000 + 7; public int knightDialer(int n) { int result = 0; memo = new Integer[4][3][5001]; for (int row = 0; row < 3; row++) { for (int col = 0; col < 3; col++) { result = (result + calculate(row, col, n, 1)) % mod; } } result = (result + calculate(3, 1, n, 1)) % mod; return result; } public int calculate(int row, int col, int n, int digits) { if ((col != 1 && (row > 2 || col > 2 || row < 0 || col < 0)) || (col == 1 && (row > 3 || row < 0))) { return 0; } if (digits == n) { return 1; } if (memo[row][col][digits] != null) { return memo[row][col][digits]; } int ways = 0; ways = (ways + calculate(row + 2, col + 1, n, digits + 1)) % mod; ways = (ways + calculate(row - 2, col + 1, n, digits + 1)) % mod; ways = (ways + calculate(row + 1, col + 2, n, digits + 1)) % mod; ways = (ways + calculate(row + 1, col - 2, n, digits + 1)) % mod; ways = (ways + calculate(row + 2, col - 1, n, digits + 1)) % mod; ways = (ways + calculate(row - 2, col - 1, n, digits + 1)) % mod; ways = (ways + calculate(row - 1, col + 2, n, digits + 1)) % mod; ways = (ways + calculate(row - 1, col - 2, n, digits + 1)) % mod; return memo[row][col][digits] = ways; } }
@DeveloperRB Жыл бұрын
Why I am not able to join whatsApp grp
@codestorywithMIK Жыл бұрын
Please try this link Follow the codestorywithMIK channel on WhatsApp: whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A Thank you 😇🙏