Live Mock Interview with @Striver | MAANG Format | GeeksforGeeks

  Рет қаралды 153,449

GeeksforGeeks

GeeksforGeeks

Жыл бұрын

Watch this mock interview with Striver in MAANG format to evaluate your strengths & weaknesses alike. A great way for self-examination, make sure to formulate your tactics before your next interview!
💻 For Complete Interview Prep , visit - practice.geeksforgeeks.org/co...
-------------------------------------------------------------------------------------
📝 Fill these forms to share your webinars with us:
Interview Experience
forms.gle/YLG5C8d6SJ6adbCQ7?u...
📝 Live Mock
forms.gle/Kf6WgHrFYsrjjEreA?u...
-------------------------------------------------------------------------------------
Follow On Our Other Social Media Handles:
📱 Twitter: / geeksforgeeks
📝 LinkedIn: / geeksforgeeks
🌐 Facebook: / geeksforgeeks.org
📷 Instagram: / geeks_for_geeks
👽 Reddit: / geeksforgeeks
💬 Telegram: t.me/s/geeksforgeeks_official
#codingpreparation #coding #datastructures #MockInterview #InterviewPreparation #LIVE #striver #geeksforgeeks

Пікірлер: 99
@trendstalk1677
@trendstalk1677 9 ай бұрын
Today, many KZfaqrs are only focused on sharing more materials, without considering how companies are asking questions or how freshers can really face interviews. Great work by Striver and GFG for providing practical advice on these topics.
@lokanathpatasahani897
@lokanathpatasahani897 Жыл бұрын
We need more such type of mock interviews
@avtarchandra2407
@avtarchandra2407 Жыл бұрын
Here i can see Arjit is struggling to get approach in the very start that clearly shows a real feel to interview ...a nice video to learn a lot from thank you @striver for such gem content ❤️❤️.....I want to know how you choose interviewee?
@aayushverma4139
@aayushverma4139 Жыл бұрын
Sieve of eratosthenes + dp on subsequences
@debapratimshyam149
@debapratimshyam149 Жыл бұрын
I think what he was talking at the end about functions is "Pure Functions". Changing a global variable from within a function is a "Side effect" and it's a bad practice to do that unless absolutely necessary. Pure functions should not have any side effects and given a set of input you can be rest assured that the output will always be the same no matter how many times the function is called.
@AyushGupta-kb9iv
@AyushGupta-kb9iv Жыл бұрын
minimum coin required + seive
@noedie4973
@noedie4973 Жыл бұрын
thanks! lot to learn here even if you get the question by yourself.
@anirbanghosh9611
@anirbanghosh9611 Жыл бұрын
Definitely top notch content
@apnachannelnitp1833
@apnachannelnitp1833 6 ай бұрын
Mixture of Sieve and Knapsack.
@rohitraj5832
@rohitraj5832 Жыл бұрын
The very first intuition i got after seeing the question was that , first i will prepare M primes in some array/vector. Then i can relate this qn. to unbounded knapsack problem (coin change problem where I've to find minimum number of denominations to make Target price). Or target sum problem to find minimum number of elements to make target . Striver Dp series helped me alot to think out of the box also ❤️❤️. thanks @striver
@sudityagupta9193
@sudityagupta9193 Жыл бұрын
I thought the same approach bro
@heisenberg3488
@heisenberg3488 Жыл бұрын
in same I thought
@yashaneypvt
@yashaneypvt Жыл бұрын
Same
@pulkitjain5159
@pulkitjain5159 Жыл бұрын
ya the same thing i realted it to , and same with help of striver's dp series . but don't you think the constraints are too tight.
@gr00t_13
@gr00t_13 8 ай бұрын
same thought process bro....
@suvigyabasnotra7378
@suvigyabasnotra7378 Жыл бұрын
Show us an interview as well where the candidate barely knows anything...!
@suvigyabasnotra7378
@suvigyabasnotra7378 Жыл бұрын
But still clears it...!
@takeUforward
@takeUforward Жыл бұрын
Scripted karne bol rahe ho 😂
@suvigyabasnotra7378
@suvigyabasnotra7378 Жыл бұрын
@@takeUforward Just kisi random CS student ka interview lene ko... jahan usey kuchh na aata ho... which would reflect the reality for most students. 😂
@madetolaugh3476
@madetolaugh3476 Жыл бұрын
@@takeUforward bahi...video aayi nhi yrrr...subah se wait kar rahe hain
@tonystonks4489
@tonystonks4489 Жыл бұрын
@@suvigyabasnotra7378 realistically someone with no knowledge won't clear the OA of MAANG level companies and won't get a chance of interview.
@arkamukherjee3962
@arkamukherjee3962 10 ай бұрын
Brute force of this solution that strike in my mind is making a vector to store all the m primes and after that use unbounded knapsack to find minimun number of prime to make n
@vijaykumarbille7727
@vijaykumarbille7727 3 ай бұрын
Clearly understood 💯...How companies approach a fresher
@momidimidhilesh829
@momidimidhilesh829 Жыл бұрын
First thought comes to mind after seeing this question is Coin Change. 1. Find first 3 primes(precompute primes if given lot of queries) 2. BFS to get minimum primes
@rajrajesh1669
@rajrajesh1669 Ай бұрын
BFS or DFS ?! Coin Change problem can be solved by DFS.
@hello_everybody-sm6xi
@hello_everybody-sm6xi 19 күн бұрын
@@rajrajesh1669 BFS we can use
@DEBJYOTIRAY-hl6ip
@DEBJYOTIRAY-hl6ip 10 күн бұрын
why do we need bfs? just apply the coin change problem and the coins available are all the prime numbers upto the given target limit
@idontKNOW-pb9hs
@idontKNOW-pb9hs Жыл бұрын
So inspiring men striver you are really great!!!
@codingaspirant9446
@codingaspirant9446 Жыл бұрын
Loved it Sir ❤❤❤
@swapyswap5887
@swapyswap5887 Жыл бұрын
binary search lower bound 1st que
@chandannikhil8526
@chandannikhil8526 Жыл бұрын
For brute force approach we can tell that storing ist M prime no in array then simple do combination sum where duplicacy allowed that is we can use same element again T.c : exponential S.c O(M)
@maremandasreekrishna8579
@maremandasreekrishna8579 Жыл бұрын
I am thinking of same approach when i first saw problem
@jaysingh1457
@jaysingh1457 Жыл бұрын
I also thought of the same approach
@sudeepbattu5525
@sudeepbattu5525 Жыл бұрын
Minimum coin change with repetions allowed and the array filled with first M primes
@sonakshibajpai6445
@sonakshibajpai6445 16 күн бұрын
very useful !
@honeyyadav9767
@honeyyadav9767 Жыл бұрын
What about we use bfs algorithm? Like simply store first m primes in a queue and then just simply keep iterating until you get the value
@krishmakhija8333
@krishmakhija8333 10 күн бұрын
i think quetion can be easily solved using lower bound concept. in nlogn complexity.
@we2riruruirirfj
@we2riruruirirfj 11 ай бұрын
similar to combination sum
@aditkaushal9397
@aditkaushal9397 16 күн бұрын
sieve of eratosthenes + dp on subsequences(coin change problem modified)
@captainmcduckyYT
@captainmcduckyYT Жыл бұрын
If they're asking this level of questions for an OA. Then I won't even make it to the interviews lol.
@prantobala8505
@prantobala8505 11 күн бұрын
Can anyone give a test case where gready fail?
@venky30111
@venky30111 4 ай бұрын
Million dollar DSA problem - Given k, X and a stream of numbers , determine the average of the last k numbers , excluding the largest X numbers
@swatantrapatel7608
@swatantrapatel7608 Жыл бұрын
❤️❤️
@varunmanchanda3972
@varunmanchanda3972 Жыл бұрын
Coin Change variation where coins are M, and target sum is N, and how come 5+3+2 is 11 ?
@HariKrishnan-ff4hf
@HariKrishnan-ff4hf Жыл бұрын
5+3+3=11 . We can take infinite supplies.
@manojkr7554
@manojkr7554 8 ай бұрын
25:00
@objectofmathematics
@objectofmathematics Жыл бұрын
@striver@GeeksforGeeks if N
@kasiruyamagata7716
@kasiruyamagata7716 Жыл бұрын
No the qn is minimum numbers of prime numbers less than m is required to sum up to n This qn is quite similar to coin change
@aamirhannan890
@aamirhannan890 7 ай бұрын
​@@kasiruyamagata7716yeah! I could relate this to the coin change with infinite supply!
@itz_ritzu
@itz_ritzu Ай бұрын
What if we find first M primes using a Sieve, and then use a recursion on that list with a constraint of M[prime] < N ? that would just take around O(n) time asymptotically? (I'm not sure Im solving it as I see the question 1st time so I'll update later). Lets take an example: Say I take N=10 and M=1. So my M list is: M[]={2} //since 1st prime is M Now of course here 10%2 is 0 so it works (we can do 10/2 to see how many 2's we need) For the next problem: N=11 M=3 So my M list is: M[]={2,3,5} //3 primes Here, we can see M[3] < N //and M is strictly increasing list so we don't need to check more We see 11%5 !=0 We store 5 in a list say K. So we subtract 5 from 11 i.e. 6 and call this same function on 6 with M[]={2,3}, and concatenate the output on K[]. so what I mean is we get 5 first, then we send 6, so we have M[]={2,3} so we check 6%3 and its 0 so we do 6/3 to see how many 3's we need. So finally we get {5,3,3} is that correct? lemme check P.S. the answer is 5,3,2 in the doc and it seems my disappointment is immeasurable, and my day is ruined.
@vishwaratnasharma2140
@vishwaratnasharma2140 Жыл бұрын
Is it possible .. to get the the list or all M primes and thn apply Target sum and count minimum counts
@abhinavraj1338
@abhinavraj1338 12 күн бұрын
Yess
@kasiruyamagata7716
@kasiruyamagata7716 Жыл бұрын
This qn is similar to coin change
@anirbanc88
@anirbanc88 Жыл бұрын
i don't get the first question, what does it mean? help?
@noobchess2516
@noobchess2516 13 күн бұрын
can we do sieve and binary search on search to get lower bound till n=0 if anyway in mid way lower bound out of sieve return -1
@krishmakhija8333
@krishmakhija8333 10 күн бұрын
ya but if by subtracting you go 1 then at that time add one instance of last lower bound number and do ans--
@anushk_iitg
@anushk_iitg Ай бұрын
7:33 LOL, sieve of.....what !!? 😂
@AdityaSingh-ui4tr
@AdityaSingh-ui4tr Жыл бұрын
Store all possible M primes in an array in the sorted order then start subtracting given N from last element of the array e.g. if N=19 is given and M is 3 then arr[]{2,3,5} 19%(last element in arr)= 4 now the main twist comes if I go with second last element then it will give me 1 as remainder which isn't a prime number we cannot add this number in our solution array. so if the remainder is 1 we have to switch to 3rd last element which is 2 : 19/5=3 + (19%5/2)=2= 3+2=5. I've not checked all testcases correct me if I'm wrong.
@kunalaggarwal3867
@kunalaggarwal3867 Жыл бұрын
Your approach is good, but it won't work on numerous testcase. One of testcase is the sample testcase included in the video where N = 11 and M = 3, the prime array would be {2,3,5}. Now according to your solution we need to do 11%5 = 1, which is false since we only need 5 once and then 3 twice.
@hrithikeshmylatty8011
@hrithikeshmylatty8011 Жыл бұрын
This solution + backtracking will work I guess. When remainder becomes 1, undo the operation by adding the current prime number once to the reminder. Then repeat the process with the next smaller prime number till remainder becomes 0.
@VishnuKumar-fo2rl
@VishnuKumar-fo2rl 9 ай бұрын
yaar itna time kaha dete hain wo log bas 5-10 min and btw ye question 10 min ka hai baki aap jaisa interviewer milega to badhiya kismat
@himanshukandwal8710
@himanshukandwal8710 Жыл бұрын
why he just started with tabulation i.e most optimal approach rather giving bruteforce approach first, at 22:02
@takeUforward
@takeUforward Жыл бұрын
There is no generic rule to problems which are not standard ones.
@raj006
@raj006 5 ай бұрын
At 7:34 which thing he mentioned he can use to find first n primes?
@sakshamShukla_
@sakshamShukla_ 5 ай бұрын
sieve of eratosthenes
@sudhiranjangupta7517
@sudhiranjangupta7517 Жыл бұрын
Unbound Knapsack ... Dekhte hi bola 😂😂😂
@shivamsolanki9153
@shivamsolanki9153 14 күн бұрын
I also solver the question but take an hour 🙁
@kushalswarup2662
@kushalswarup2662 Жыл бұрын
7:35 whaaaat
@yeshwanthvatti2200
@yeshwanthvatti2200 Жыл бұрын
Sieve of erathosthenes.
@aryanbharat9749
@aryanbharat9749 Жыл бұрын
Can anyone have links to the questions
@vinaybadola4681
@vinaybadola4681 Жыл бұрын
Check gfg post Minimum number of single digit primes required whose sum is equal to n
@SanjanaSingh-mc6re
@SanjanaSingh-mc6re Жыл бұрын
Why can't we use greedy approach here? Like for N=11 and M=3, I could have started from the biggest prime no. that's gonna be 5 and subtract that value from N and update value of N until I don't get value of N less than the current prime no or value of N==current prime no+1. In that case, I will move towards the smaller prime no and try to do the same thing with that. If N!=0 then we can't make N with the help of first M prime no.
@shardendushekharchaubey5582
@shardendushekharchaubey5582 Жыл бұрын
You'll also have to handle an edge case like n=4, m=2 Or n=6 m=3
@shardendushekharchaubey5582
@shardendushekharchaubey5582 Жыл бұрын
Here greedy can give -1 because from 4, it'll subtract 3, then 1 remains which is not possible.... So we'll have to add a condition that after the subtraction, the remaining no. Should not be 1
@mandavasairaghavendradines6582
@mandavasairaghavendradines6582 6 ай бұрын
2+3+5 is 10 right. Why he told its 11?
@atharvak1503
@atharvak1503 Ай бұрын
5, 3, 3
@prabhattiwari007
@prabhattiwari007 3 ай бұрын
Striver se sikh ke striver ko interview dene ka maza hi alag h😂
@frickofunky2008
@frickofunky2008 Жыл бұрын
his voice was shaking
@vishnuvarunthorthi
@vishnuvarunthorthi Ай бұрын
test
@namansharma7531
@namansharma7531 Жыл бұрын
Step1: Make an array with first M prime numbers Step2: Use unbounded knapsack code: import java.util.*; class Solution { public static int minPrimes(int N, int M) { int[] arr = findPrimes(M); int ans = unbounded_Knapsack(arr, N); return ans; } public static int unbounded_Knapsack(int[] nums, int N) { int len = nums.length; int[][] t = new int[len + 1][N + 1]; for (int i = 0; i
@shamsulhaque55
@shamsulhaque55 Жыл бұрын
All fake and bogus
@Sushank777
@Sushank777 Жыл бұрын
Are you good at problem solving?
@shamsulhaque55
@shamsulhaque55 Жыл бұрын
@@Sushank777 No one is !
@Sushank777
@Sushank777 Жыл бұрын
@@shamsulhaque55 stfu... those who work hard to improve problem solving skills are good at it... So, go first improve yourself it's better than criticising someone who is 1000X better than you. Btw what's your codechef or codeforces profile?
@dakshsinghrathore9584
@dakshsinghrathore9584 Жыл бұрын
🤣
@ojasdighe991
@ojasdighe991 Жыл бұрын
@@shamsulhaque55 i am
@bharathraj9331
@bharathraj9331 Жыл бұрын
How can I get a chance to give a live mock with striver?? @striver @take U forward
Live Mock Interview with @striver_79  | MAANG Format | GeeksforGeeks
55:16
Google Coding Interview With A High School Student
57:24
Clément Mihailescu
Рет қаралды 4 МЛН
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 11 МЛН
Coding Interviews Be Like
5:31
Nicholas T.
Рет қаралды 6 МЛН
How to NOT Fail a Technical Interview
8:26
Fireship
Рет қаралды 1,3 МЛН
Google India Engineers in a Mock Coding Interview
15:29
Life at Google
Рет қаралды 160 М.
Asking Google Engineers How To Get Hired and Their Salaries
11:05
The Code Skool
Рет қаралды 1,6 МЛН
Software Engineering Job Interview - Full Mock Interview
1:14:29
freeCodeCamp.org
Рет қаралды 1,3 МЛН
How I Passed The Google Coding Interviews
18:50
Chris Jereza
Рет қаралды 20 М.
TCS Campus Interview I Campus Placements I Gauri Shrimali I Arvind Singh Pemawat
18:09
I Almost Crushed The Poor Cockroach😵🥲🥺
0:20
Giggle Jiggle
Рет қаралды 13 МЛН
How is it possible? 😅 #behindthescenes? #vfx
0:19
The Quinetto's
Рет қаралды 21 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
0:21
Паша Осадчий
Рет қаралды 8 МЛН
Зря они облили полицейскую водой...😂
0:25
Ахахах 👅
0:44
Dragon Нургелды 🐉
Рет қаралды 1,4 МЛН
Не поймаю говоришь? ;)
0:55
BORODA TV
Рет қаралды 4,8 МЛН