Letter Combinations of a Phone Number Dynamic Programming | Mobile Numeric Keypad Problem

  Рет қаралды 18,629

Pepcoding

Pepcoding

Күн бұрын

Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. Here you will learn about Mobile numeric keypad problem. In this question :
1. You are given a number N, which represents the count of buttons pressed on a mobile numeric keypad.
2. You can only press buttons that are up, left, right, down to the current button and the current button also.
3. You can not press bottom row corner buttons(* and #).
For a better experience and more exercises, VISIT: www.pepcoding....
Have a look at our result: www.pepcoding....
Follow us on our FB page: / pepcoding
Follow us on Instagram: / pepcoding
Follow us on LinkedIn: / pepcoding-education

Пікірлер: 30
@sujoyseal195
@sujoyseal195 3 жыл бұрын
Sir, in the 2 nd iteration , value for 9 should be 3 . Numbers are: 69,89,99 . Which makes it 1+1+1=3. Notice that 7 and 9 are symmetric , so Val(7) = Val(9) must happen. Sir, please clarify. Your explanation is the best, sir
@shreeyagupta8472
@shreeyagupta8472 3 жыл бұрын
Also, iteration of N=3 is to be changed accordingly.
@its_me3716
@its_me3716 3 жыл бұрын
you are really doing great work..no other content is such clearly explained..thank you so much
@lovleshbhatt7797
@lovleshbhatt7797 4 жыл бұрын
for digit 9 the when we consider 2 digits the ans should be 3, Please correct it Thanks for this video.
@sujoyseal195
@sujoyseal195 3 жыл бұрын
Yes man : 69,89,99
@rohitshinde8478
@rohitshinde8478 3 жыл бұрын
Thank you sir , for this wonderful explaination
@alesblaze7671
@alesblaze7671 3 жыл бұрын
Bhai you nicely explained it , loved it.
@Pepcoding
@Pepcoding 3 жыл бұрын
Thankyou, I am glad you liked it. I also hope that you are watching till end. Will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms)
@alesblaze7671
@alesblaze7671 3 жыл бұрын
@@Pepcoding brother although you could have optimised it to use 2 rows only as to calculate current row we need just one previous row. And i will give a good feedback about you on that quora link.
@Pepcoding
@Pepcoding 3 жыл бұрын
@@alesblaze7671 agreed, 2 rows mei ho jata
@PankajKP
@PankajKP 4 жыл бұрын
Sir please ek video gas station problem pe bnao vo bhot confusing hai
@paryt7696
@paryt7696 3 жыл бұрын
bhai aap keh rhe ho 1 kiske baad daba ho sakta hai, arey yr ese hi keh do 1 ke baad ye ye daba sakte hai, ya isme koi issue hai?
@ShrutiAgrahari0803
@ShrutiAgrahari0803 2 жыл бұрын
best explanation sir
@Pepcoding
@Pepcoding 2 жыл бұрын
Glad you liked it! Keep learning. And for better experience, visit nados.io, where you will get well curated content and career opportunities.
@adityaraghav8693
@adityaraghav8693 3 жыл бұрын
this one was a great problem 💥
@payalsagar1808
@payalsagar1808 3 жыл бұрын
Just wow😍
@Pepcoding
@Pepcoding 3 жыл бұрын
Thankyou beta! I am glad you liked it. If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
@Elon-musk-007
@Elon-musk-007 4 жыл бұрын
Sirji space complexity can be optimized!
@factswithai2
@factswithai2 3 жыл бұрын
East or west summet sir is the best
@Pepcoding
@Pepcoding 3 жыл бұрын
Keep learning, Keep growing and keep loving Pepcoding!😊
@mukultaneja7243
@mukultaneja7243 4 жыл бұрын
Sir.............I think the question is not explained properly on the site. Please rephrase it.
@Pepcoding
@Pepcoding 4 жыл бұрын
Alright. I will check
@sommayghosh4617
@sommayghosh4617 4 жыл бұрын
@@Pepcoding acha explanation h sir good work, meine code wala part dekha b ni kyuki algo hi itne ache se smjha dia apne
@brijpatel237
@brijpatel237 3 жыл бұрын
Roadies salute :-P !!
@Pepcoding
@Pepcoding 3 жыл бұрын
Haha..thankyou! If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
@tusharnain6652
@tusharnain6652 Жыл бұрын
//Constant Space Solution { // making the data graph for each number vector dataGraph{ {0, 8}, {1, 2, 4}, {1, 2, 3, 5}, {2, 3, 6}, {1, 4, 5, 7}, {2, 4, 5, 6, 8}, {3, 5, 6, 9}, {4, 7, 8}, {5, 7, 8, 9, 0}, {6, 8, 9}}; vector dp(10); for (int i = 0; i < 10; i++) dp[i] = 1; for (int i = 2; i
@pulkitgupta9441
@pulkitgupta9441 2 жыл бұрын
This is a little different approach to the same logic import java.io.*; import java.util.*; public class Main { public static boolean isValid(int i, int j) { if(i >= 0 && j >= 0 && i < 4 && j < 3) return true; else return false; } public static int solution(int n) { int[][] curr = new int[4][3]; int[][] next = new int[4][3]; for(int i = 0; i < curr.length ; i++) { for(int j = 0; j < curr[0].length; j++) { curr[i][j] = 1; } } curr[3][0] = 0; curr[3][2] = 0; for(int l = 2; l
@abhisheksadhu411
@abhisheksadhu411 4 жыл бұрын
Sir, great explanation..... ☺ I have put up query, pls reply me on telegram sir....
Longest Common Substring Dynamic Programming
27:22
Pepcoding
Рет қаралды 27 М.
Burst Balloon Dynamic Programming | Leetcode Hard Solutions
50:04
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 4 МЛН
She's very CREATIVE💡💦 #camping #survival #bushcraft #outdoors #lifehack
00:26
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 30 МЛН
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 19 МЛН
Matrix Chain Multiplication Dynamic Programming
40:16
Pepcoding
Рет қаралды 46 М.
Optimal Strategy for a Game Dynamic Programming
31:09
Pepcoding
Рет қаралды 63 М.
CIE Modified question on Queue String to ASCII fuction code added
1:08:33
Rotate and delete | GeeksForGeeks | Problem of the Day
9:34
Mathematics
Рет қаралды 274
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 4 МЛН