Live Mock DSA | GeeksforGeeks

GeeksforGeeks · Intermediate ·📰 AI News & Updates ·4y ago

Key Takeaways

Introduction to Asynchronous Javascript with Chethan B M

Full Transcript

[Music] hi hi are you sure this course is just for two for nine nights yes and you know this is the only course with this expertise across the world no way yes way [Music] don't delay enroll now [Music] hi hi are you sure you can prepare for product-based companies through this course yes sitting at home no way yes way don't delay enroll now [Music] [Music] hi and welcome to geeksforgeeks today we would be interviewing kashyap panchani and i would be the interviewer so now without any further ado let us welcome kasia okay fair enough so can i have a bit introduction about you yeah so my name is third year of my college i am pursuing btech from dii city gandhinagar i am competitive programmer i have been doing competitive programming for one year i am expert on broad forces and stack order on whatsapp okay so can you talk a bit about your projects yeah so as a competitive programmer i don't make any i didn't make uh more too much too many projects like yeah i do have some knowledge of html and css so i make one project integrated these three languages html css and c plus plus fair enough so what was the project all about yeah so it was uh called intercity travels basically bus reservation system so where you can book a ticket or cancel ticket in advance also also by creating by creating an account or login and whenever you booked uh any ticket so in your default browser uh i introduced html and css so in your default browser one window pop-up and it shows the detail of all of your ticket here so now we would be having our dslr where we would be i would be giving you questions and it would consist of around one or two questions and if the time process we would be moving forward with the third question and in between if you require heads you can ask me and explain your solution as much as possible so that you would get to know what are your explanation skills because it matters a lot suppose you are five star on code chef that means that you are good with data structures and environments but entirely depends how much you are able to deliver so try to explain as much as possible so that the audience would be benefited from it okay okay so i have floated you uh dot link open the dot link turn up all your notifications and share your screen and i will add it to the screen yeah i would be adding it just open the dock no buzz in the comment today okay fair enough so just above the summary there is an arrow that is there just remove that arrow sorry just above the summary where it is written on the left hand side um okay yeah just below it below yeah yeah yeah that's okay we'll just increase the point sorry i would increase the phone size okay so now in this question you are given two singly linked lists of size n and m okay and you need to write a program to get to the point where two linked lists intersect each other okay so i would just paste the question so that you would get the hint of it yeah this is the question and [Music] and if you want the test case this is the test case suppose the first linked list given is 3 6 9 15 and 30 and the next given link is 10 15 and 30 in the first point of intersection is 15 and the output to this would be 15 itself am i clear with this yeah yes okay so now you can start solving yeah absolutely extra you can yeah i would keep talking throughout you are solving you're talking you are taking time to think okay yeah so like let's talk about brute force approach first so like in brute force like uh if you're about this test case so what we can do we can take ahead of this first linked list and we can take head of this second degrees right so we can iterate one book so that like if uh in this case 3 is not equal to 10 right so we can move head to next and we can uh uh okay so like yeah um we can do it yeah so first uh just a second sure yeah so like in good for suppose what we can do is that we can take three and we uh we can take one second note as head of this point right so and we just have to increase this uh first pointer not second pointer so like if we if we are at three then this is not equal to ten so we uh we can uh increase the second quarter two six right so and we are at six and we can compare like it's 10 so still this is not equal so we can move next so this is 9 still this is not equal and we can move to 15 and then we can check sorry again if we have nine here then we can check whether it's next is equal to this next or not because um wherever the link is intersects there is a one node whose next is similar right so in this case nine and ten two pointers are there who's next next is similar so we can do that thing but suppose the second linked list is yeah so we can we have to reverse uh we have to reverse this process for second linked list also but suppose the intersection point is suppose the second linked list is a little bit far away suppose it is not the next next one like see in this given example yeah yeah i got it we have to get every indexes right so we we first fix this index right so we can check we first fix this index we have to fix 15 then we have to fix 30 so like uh we if we fix 10 right so what we can do we have to traverse first first pointer to the uh end and we we can check 3 is not equal to 10 6 is equal to 10 9 is not equal to 10 15 is not equal to 10 30 30 is not equal to 10 so 10 is not in the part of our answer so in the uh and similarly uh we have to check for 6 also so 6 yeah so similarly we fix 15 now we can check 3 is not equal to 15 6 is not equal to fifteen nine is not equal to fifty so we can say that yeah uh this is the answer so we have to uh fix uh any node hold the node by the so only node from one link list so if overall time complexity is order of uh n one into n two where n one is so first linked list and n two is size of second linkage so yeah it's a brute force after then space complexity is uh order of one so we are not taking any other notes uh and what we can do to optimize it yeah so there are some small small things that i want which of you the size of the link is given is n into m it is not n1 into n2 so just keep this okay fair enough yeah it's absolutely fine so now moving forward to this if you are what something of the same thing what told by a ship is he would hold up a node and then he would iterate on the second linked list then he would hold the second node and he would iterate on the next linked list and then he would hold the third node and he would iterate on the third linked list and the point where the that both would merge would be the first point at which it would be the merging am i right because for each node we are iterating on all of the nodes of the next linked list so we are doing this for all the nodes so the time complexity is n cross fair enough as we are doing this only with the help of loops so the space complexity is big of one so the time complexity is big of n square can you improve over the time complexity thing yeah sure so what we can do here is that we can make the size of the link is equal so from the last one right so you know this size is a first linked list has size five and second actually size three right so we have to reduce this first size how we can reduce this so we can remove this one so not remove like just point to the next one right so now size is become four so then we we can improve our head to this pointer nine so now size is three and three right so like uh if you talk about intersection so um of course the there is intersection at the end right so uh if intersection was at beginning so we have to remove that last pointer so uh it uh here it is at the end so we have to make we have to remove the upper arm so upper not opera but upper nodes of first link list or second link list which have size larger than second one so now we can do like our link list has become nine fifteen and thirty and uh secondly says value ten fifteen and thirty so yeah uh intersection has at the same level so we can check 9 is equal to 10 no so we have to move further in both the cases so we have to move here 15 and here 15. so yeah we can see that 15 is equal in both cases so now i have pasted a function below your image so let me first explain the approach that you are trying to pretend so what uh what question you can keep coding you can start the your coding so now what kashif is trying to tell is as the difference lies in the height so it would be kind of like this okay this thing like this would be the first linked list and this would be the second length so what we can do is we can just equalize the height so if the height is equalized then we would start moving in the same arena and then the point where we would intercept we would say that this is the point of intersection okay so how to do that we would first calculate the height we would travel the difference in the height and the first point where they would be meeting would be the point that would be the intersection okay do we have the intersection element yeah the intersection element yeah it's fair enough so i will just paste it so that you would also have a proper idea so the intersection way remains the same you can get the data of the data of the node by using the arrow function of data and the next one is the next the same way okay can you please confirm whose voice is cracking because for me it's kashif's voice sometimes that is cracking but still can you confirm that it is mine or him okay yeah same so we have a lot of people okay yeah his voice yeah fair enough now both voices clear yeah that's why i didn't interrupted him i saw that sometimes his voice is cracking yeah yeah thanks a lot thanks a lot everyone so we have 72 people live here okay so tell me the place from where you are seeing the stream tell me the city tell me the city from which you are seeing the stream everyone now currently i am at my home so i am streaming from dhanma okay okay we have people from different parts of the india still in india okay what about others okay jammu marvin is from gujarat ayush's from jammu mumbai fair enough okay let's see what kashif is doing okay he's writing his code i will try to make his code in the next page kashyap i'm making your code in the next video so that you can also write in peace i'm from andhra pradesh okay okay group is from haryana okay by the way your name is cute the image is also group code old god killer this is a funny name okay can we insert elements of l2 in a set and then traverse until we find a name in the set yes absolutely we can do that we can use a hash map we can use the hash map and this this time complexity and the space complexity of this approach would lie in between the brute force and the most optimistic the one on the one which is coding which is coded by kashyap at the moment it is the most optimized one and the brute force one he has explained and the solution of this okay this is the next one in which company you are sir currently i'm interning at geeksforgeeks currently i'm an interning network i'm still in my college just graduated from third year just had my just having my same spray break after sex can you explain the optimized code okay can you explain the optimized once again please yeah you don't need to see me please i would explain it so uh see the this is kind of like this the first one see like this and then this is the intersection point so this difference this difference is creating all the problem so what he is doing is his first is first making the distance equal then after this distance is equal this v from y to v then he is traversing from the both the point okay and then the first point where they are intersecting this is the point where it is the intersection point okay i am from bangalore okay language type is a big concern for dsa or no no it is not no it is not from bokaru jharkhand okay myself too from jharkhand i'm from dhanbajan but i study in kolkata yeah yes sir i think it's done okay fair enough so now let us so can you paste your code that is given in the private chat go to the link given in the private chat and paste the page tips for google on ninth july they give a lot of question on binary research two pointers give give your basics right keep your basics right most of the product-based companies they try to attack on your basics don't mug up questions they would attack on your basics trust me how to utilize this remaining days so see first see all the important all the important things that are needed so if you are missing out on any important thing that is absolutely necessary complete that necessary thing if you have already completed the necessary things then don't try to learn any unusual topic that has appeared less frequently okay so do all do practice on over all the frequent things and try to master everything uh i have purchased a dsa course from gfg okay great what do you suggest for tcs nqt for tomorrow tomorrow thesis nqt dynamic programming or graph problem go to there might be a scenario the basics mean data structure yeah the six mean data structure the basic data surface yeah yes okay fair enough now can you please explain your code yeah yes so first of all i am here nnm is the size i'm calculating the size of first linked list and for m i'm calculating the size of second linked list so this is the code for size simple side now i have take two pointer first is current one and second is current two current one is pointing to the head one and current is going to the second point right so if n is greater than m then we have to reduce n so we have to increase this current one so i am doing current equal to current of next and i'm reducing n minus minus and if m is greater than n then we have to reduce m so i'm doing current a 2 equals the current of x and i'm doing yeah we can say that um after this episode after that i am doing um traversal from okay so you're just traversing from that and you are checking that the value is equal enough okay yeah you are you i'm able to hear you at this point sometimes your voice is breaking hello yeah yeah yeah it's fine your network is breaking issues can you pass the institute faster yeah yeah it's absolutely fine if you want you can stop your cameras hello yeah are you able to hear me okay [Music] okay so quickly tell me if the problem is from my side or health okay so kashyap are you able to hear me now the problem is from whose side mine or kasha okay okay so let's quickly wait mike is going okay let's just see if we can fix this on there this happens okay all the best questions you are going good okay let's see he was going at a good pace and he had he had a lot of confidence over him he didn't took time to think let us see that if we can if he comes back it would be a very adventurous one because he seems to be a player over dsa hello sir yeah can you hear me question uh your voice is not vertical to me i don't know okay okay okay okay okay then okay okay so fair enough how you are getting internships at jeep core gigs i didn't get gotten internships i was initially i was initially in a part-time role then i got then i gave then i go i gave uh exam and then i was promoted okay okay so one last try and let's leave this done are you able to are you able to hear me which platform is especially from id background it depends okay fair enough so kashyap has gone by this time he was a kind of player not a candidate so he seemed like a player it i thought that it would be fun interviewing him but due to technical issues his mic went wrong his voice was echoing so he had to leave this so can't help it so i would still wait for one minute so this is an ask me anything session you can ask me whatever you want for the next one minute and then we would end the stream fair enough so i would quickly change it to ask me anything session and then i will end this kashyap are you able to hear me yeah yes sir sorry for thinking okay fair enough so let's start again okay ask me anything is cancelled please share your screen now okay i was missing your brother okay okay okay so the first question is then let's move to the very next question the next question is you are given a grid of dimension n cross m when each cell have values 0 1 and 2. am i clear to this point or not you are given a grade of dimension n cross m and each cell has value zeros one and two well zero represents an empty cell one represents fresh orange and two represents rotten orange so i'm not clear about the situation let me paste it here so this is the question we are given a grade of dimension n cross n where each cell in the grid can have the values zero one and two which have the meaning like empty fresh and wrong fair enough yeah yeah okay yes now we need to determine what is the minimum time required to rot all the orange or if it is possible or not suppose it might not be possible that we can't rot all the rooms because if we don't have a connection we can't rot all the rage if they have an attachment between them then only we can drop it and from our particular index i and j okay from a particular index i and j we can move to left right up and down in one unit time fair enough yeah yes sir okay so now take your time and let me know okay okay so suppose like i have n is equal to three and m is equals to three and have a grid like one zero and two then one one one and have two zero so uh um i have to return a matrix that contains the oh min i have to written minimum time right yeah yeah so in this case like if we have to wrote this orange then we need two steps so like from here and here so for this orange we need um one step like yeah it's just adjacent to this one so for this one also we need two step either via this path or either this one okay for this it is one and this so answer is in this case answer is two right yeah okay so you want one more test case like for c this is the empty cell zero is the empty set and one is the fresh orange so i would just open the test case i would quickly explain it to the audience also so i would just make it big okay i hope it's fine with you yeah okay fair enough so from this one so from this zero that is on zero cross one from this zero i can rot the orange okay so from this is an empty cell i can't do anything so two is the rotten orange that is zero two okay so two can draw the orange on this position that is one 2 and then it can rot this orange this and this 2 would rot the orange that is 2 0 would rot the orange of 1 0 in one unit time fair enough and this 1 0 this 1 0 2 0 2 would rot the orange off this 1 2 as well as in the next unit time it would rot the orange of 2 2 are you clear with this yeah that is why that's why the answer to this is to itself okay now tell me that how to solve this problem yeah so first talk about force approach so in brute force what we can do is that we can store the indexes of two right so suppose in this case uh at uh uh i am considering one base index so it's one comma three has two value and 3 comma 1 has two values right so yeah so what i have to do is that i have to traverse all of the grid and if element is one then i have to find the adjacent two so i have to find these two right uh okay like yeah there are empty cells as well so we cannot do simple traversal see there is one more thing that needs to be told suppose there is a fresh orange that is there and there is a rotten orange so after this rotten orange has wrought this fresh orange then this orange the recent one which is which is wrought now would also start rotting another orange now do i make sense yeah yes so like if we don't have empty cells then this will work but if we here we have empty cell as well so i would say like for each one i call bfs and i will find the uh minimum distance of two so for this cell it's two right so uh either i from this position or als only for this cell it's one from this position for this cell it's uh two from this position or this position so i can do this um to find the i can do bfs on each cell containing one to find the uh minimum distance minimum distance of two from that cell it uh time complexity of that would be like it if it is has an input m then i have to traverse all the grid and uh time complexity would be order of n square into m square because um inverse case time calculated out of n squaring function because so suppose i have a one at all the places and into m and i have two traverse for each one and i have to do bfs so it will take order of n into n time and for each one i have to do the same operation so it will take order of n square into m square time complexity so yeah can we do better in this case so uh if you try to optimize this one so what i will do i will take one queue and insert all the all the position of the cell where it contains two so suppose i have insert this one uh one and three and then a three and one right so and now what i will do is that i will check for this i will take first position so i will take one and three i will take one energy right so now i will check this four position in this case so it's i minus one j so this one it's zero comma two which is not possible because we consider zero we considered zero's one base index so this is not possible so we can we ignore and similarly if we take about two comma three right so i will check whether it contains one or not it has a value one or not so it has values so then i will insert in the queue so it's simple bfs type of thing so and i will store this value as uh uh i and i have i can store another value like it's zero and it's a zero so distance of itself so i can store another value here it's a one because uh i am considering uh one step ahead so it should be one and it should be one and i will store if it is it has two comma three has one on that particular grid then i can say that uh distance is one so for two comma three i update the distance and i i can take uh another vector uh visit for visit a visited grid so like suppose i am here and i have visited this one comma three and now i am going to two comma three so for uh repetition purpose we have to take visited so that if cell is not visited yet then only then we have to move to that cell so in this case uh two and three is not visible so we visited so right we can push that into in interview so i will push into the queue so it will become two comma three comma one and now what i'll do uh yeah so it has more cases all as well so for this quest so if i take about one comma two one comma two comma one so i am considering i and j i comma j minus one four one over three so yeah so whenever from each point you would start doing a dfs and you would use a visited array so that you don't encounter reputation this is what you will be doing yeah yes sir okay okay so now so what would be the time complexity now yeah so now time complexity is uh order of n into m and space complexity is order of n into m as well because you have keep the visited area right so you are not repeating a particular index at the most okay so there was a small optimization and there was a kind of backtracking in your explanation so can you please sum up the your explanation again in a concise manner just what you would be doing yeah so i will push all the element first of all that contains two after that i will move adjacent and yeah yeah index index the position of that particular so i will uh put all the element in the queue first of all and then one by one i pop up one uh element and i will check if i will check this fourth possibility i minus 1 j i plus one j and this four possibility and i will check if it is a valid one and and uh it is not visited and and um that cell contain value one then and only then i i'm going to push that into q so and i'm going to pop up that one and i'm going to push that four value which satisfy that condition okay so let's proceed with the implementation yeah so i have pasted you yeah you won't star okay as the implementation would be a little bit large so i would just name it as d okay it's fine with you so did kashyap will join gfg if you crack this interview no because this is the mock interview given by geeksforgeeks so that you get to know you get to know what are your strengths as well as what is your weakness check every okay guess in the intersection we have to take two while loops one while loop for the first linked list and second or the second link is to check the three with every element of the second one no this we want to do this okay best cv making templates needed uh i think there are two cv making templates one is the column one one is the row one okay two columns one which platform is good for beginner which platform is good for beginners to start coding especially from non-iit background i think that it depends on your preference like if you want to start off with the essay then you can start off with geeks for keeps if you want to start off with competitive programming then you can start off with hacker track okay how are you getting internships and get geeksma gigs okay i was not able to reply this because i was reading the text by kashif also so yes initially i got a part-time role at geeksforgeeks then after that through the internal hiring i came across multiple exams multiple rounds and then i was offered an internship then based on the performance over the internship i was given an exchange okay using of which algorithm is good so see uh you can say that the best algorithm for graph is belmont why belgian code because it calculates the all pair shortest distance that algorithm is very good but it entirely depends on the needs on the time complexity because it might be a case that one algorithm is solving all your problems okay most of your problems can be solved by using bellman ford but the time complexity of bellman ford is absolutely very high that is v cube so even it solves all your problems over graphs most of the problems like shortest path problem it can solve but the time complexity absolutely very high so which algorithm is good or which algorithm is best it entirely depends on the permitted time complexity it entirely depends on the needs okay any more queries apart from this with less time complexity so see the most less time complexity is bfs but uh time combination bf has big o of n dfs big o of n that is also but it is not the scenario if there was one and only algorithm then everyone would be a master of coding it depends a lot on the choice of algorithm according to the needs okay so the classic old competitive programming style he is using an array of dx and dui fair enough okay not using four four f statement but using okay n plus one m plus 1 q of pair of pairs and end the first one is to store x and y coordinate x and y then we have this okay then he is pushing all the source and marking it as visited and the distance to reach the source is zero okay okay i will tell him to explain okay this is the classic old style okay how much time is required as a beginner to be expert and competitive program so it entirely depends on your pace on your capacity the hard work you are putting in how many questions will be asked in the smok interview in the smog interview it is 8 18. so this is the last question that i would be asking because the implementation for this is a little bit long and thanks to his comparative programming style that he is not using for if statement okay till then i would just explain what is this d x and d y so this d x and d y is zero and one so if you look closely at the indices if you're moving on the left hand side if you are moving on the right hand side then suppose this is 0 suppose this is 1 1 then if we move to that size then it would be 1 2 and if we move up it would be 0 1 and if we move on this side then it would be 1 0 so basically the difference lies in either x or y either x is getting incremented or either x is getting decremented either y is getting incremented or either y is getting decremented so what he has doing is instead of doing the x incrementation by incrementation decrementation for if statement what he is doing is to save on time and to save time on implementing he has used a dx and dy so that the first one is using a for loop of 4. so the first time dx plus i that would make that would increment the x by 0 that is the first point dx of 0 that is 0 x would remain the same and y would be incremented by one if you look closely in the next step again x would remain the same and y would be decremented by one and same goes consequently am i clear with this or not i hope i can get as good as this guy at dss someday you don't need to hope basically if you work hard you can do it absolutely this is absolutely achievable this is not something rocket science or something this is achievable if you work hard if you have practiced a lot of questions then a variant of that question would be okay for you so kashyap how many questions you have done what is your solve count all platforms yeah so i've done i am not you know familiar with dsa proper i'm i i'm doing cp so in dsa i have done 300 question on g4 gigs and in just uh i guess one month yeah so and if we talk about code yeah god process i have done around 300 to 400 sure okay so heard his self count he has done more than around 300 to 400 problems yeah so what was your initial experience when you started solving uh the problems of code courses what was your initial figure it was quite hard for all of the like uh i am not aware about code forces i i was doing hacker rank so after i heard about that code forces like i have doing but i'm doing this thing but like yeah it's quite hard in starting but like yeah you will manage even if like sometimes i am not able to solve c so it's it's a thing right so it's depend on your logic how you come up with a quick logic and all that stuff it's the first time so the first question so the suppose you are doing good on hacker and then you shifted to code forces and then then you solve the first question i think what was my first question was that even an odd problem that you need to give it a half on that was my first problem that is that has the most solved count so what was your so what was your experience on the first problem yeah so like uh i'm not remember that first question i have sold on hot forces but yeah i think i am i got disappointed at that time because like i was doing hacker rank for two or three months and after switching the platform i am not able to do a single question for in some context so yeah it's uh but the example uh i kept myself motivated by saying that yeah you will do better and better one day so thank you yeah okay so you are done yeah i think i am done okay can you explain uh line by line i won't be telling you to submit this because okay do you want to submit you can ignore this because your logic is you want to do something no it's okay i have done this question before so for this okay so i won't be telling you to submit this because it might be accurate the case that there might be semantic errors and the code is very long so it might take you some time to deal with sometimes so okay so can you explain line by line your logic that what which why you are doing this while you're doing that so i can ex okay his voice is stuck yeah so i okay um so initially all the element is not visited yet and i have take one cube for the bfs purpose and i am first uh i will insert those element whose in this value is 2 so i am inserting so this should be i plus 1. i i am considering one base index so like yeah so i have i mean i have inserted all the element that is value 2 and i marked that um index as one yeah it's visited and its distance to itself is zero so i this is for distance uh so first pair is uh yeah so first pair is for uh um coordinate and second port is a distance so so yeah it's distance is zero and i kept one distance also a distance distance array uh for those element whose value is one so yeah um you have excellent this thing so like it's zero and one zero and minus one one and zero minus one and zero so this fourth possibility is possible yeah so i will do b uh and uh here i am doing bfs so while q is q has some element is present in it i will take first element and this first element first pair and i am doing x and storing those value so x and y and then distance of that particular index and i'm hoping that element and after that because the screen sharing is taking up your bandwidth and your voice is breaking out or you can okay so yeah now you can should now share share your screen again again it so you don't know why this is happening okay fair enough okay so now as kashyap has explained can you quickly go to the code back again so now yes there is a small error that you are making okay and that would make the code all wrong the small the small mistake you are making is that you are taking the minimum distance to for rotting particular orange suppose i have so why do we need to see the maximum let me explain it to the audience suppose i me so i and kashyap were told suppose me and kashyap are brothers and my our parents told that do this homework and tell me the time frame minimum time frame in which you both would complete this is what is where every orange would run so kashif told that yes he would take around three hours i told that i would take around four hours so the minimum time that we would give to our parent is would be four hours that would be the maximum because the maximum time would be the time where we both would be completed because in three hours only kashab would be able to do his homework i won't be able to do is i won't be able to do the homework this is the point where we need the maximum now you can unshare your screen fair enough so just a sec i would quickly edit the so i would give the feedback and then i would reply to the comments okay not talking about the feedback so if you talk about the feedback so initially when you started off with the project explanation you can start off directly without using without mentioning the text stack you didn't explain your project you just mentioned the text check and then you moved for you but if you are going to explain your project you can just say that yes i need a project which solves this issue or which is based upon this or that and then you can mention the text that you are working upon fairness this is a small modification that you can add now moving forward so now when a question was given when the first problem was given to you you quickly came up with a solution and that was truly commendable and it speaks that you are quite confident about your dss skills and yes you it seems that yes you are my player i would quickly back this up but see this is not a competitive programming in competitive programming we have an issue that if we don't submit it at the very there is a queue there is a rush going on that if if i am not able to submit it very first i won't be able to gain i won't be able to top the leader leader but this is not the scenario in an interview why this is not the scenario i would tell you why this why this attitude of yours is making a is turning into a mistake when you started off with the brute force approach without even analyzing you quickly gave up the brute force approach but that turned out that you had to modify the brute force approach in between your explanation okay and this happened in both the questions okay fair enough this was a small small modification that you can first take your time you can analyze that yes this brute force is working fine on you so in the interview it all up it's all about the impression okay it you need to say that yes i am good but if you are making mistakes in between you are not good it seems that you are you are playing it you are rushing it but this rushing is coming from competitive programming it it you have that habit that yes i need to implement it fast i need to submit this fast you have a long template going on yeah okay fair enough i understand this completely so fair enough so this is the point where you can do this now when you are implementing this okay this was a mock interview and yes i can read the comments and i can keep the clock going okay but see the interviewer would be sitting and staring at you so you can take your time in the implementation instead of implementing it in two minutes you can take your time and implementation and you can implement it in three to four minutes instead of doing that and then after writing one line you can say that yes this dx and d y is for traversing all the four distance and this would save me on the if else statement yeah okay this all things like while you are implementing you can just convey it yeah so that the interviewer can keep reading it can can find mistake because first you would explain your approach to the interviewer then he would also take time well it might be a case that he's an international grandmaster but he would take time to read their solution first he would explain approach and he would take time okay that is why you can just explain your approach till you are going moving forward okay what is going in your mind just convey okay other than that you are pretty good with dsc trust me you are pretty good with dsa you have an absolute absolute confidence that yes i can back this up okay just slow up your case a little bit and just see if you just think before you speak you would be absolute perfectionist i hope you understand yeah okay so now there are a lot of comments going on and go for competitive program i would reply one you would reply one okay so how much okay so you reply this that i hope i can get as good as this guy at dsa sunday what's your stake skill yeah definitely like if you you know it's all about hard work right so you have to do a daily 20 to 30 questions as much as you can i'm not saying that you have to do yeah you can start from five question per day and you have to consistent right you have to do consistently that thing so even not that like i have i have done 30 questions today and for next two days i am not solving any of this question so now not not after that you can do uh day by day and yeah you have to do consistency okay so now the next question i would answer i would answer it so can you tell me is one year enough to be good at competitive programming so i started off in code force i started off in code forces in the very second in the second year i was into hacker rank or something then i shifted to code forces so initially had i faced a lot of problems but as uh kashyap also did i was doing the same i didn't target 20 30 to 40 problems but what i did was i took up a set of five problems i took up a set of five problems and then in 15 minutes i would try it for 45 minutes initially i gave up a time of 45 minutes now i gave a time frame of 15 minutes so initially i gave 45 minutes that i would think about this next 15 minutes i would just read the first line and then i would move forward and the whole day i was doing competitive programming so if you are doing competitive programming at full speed full space and you are only focusing on that solely focus is cp and cp nothing else okay then one year is enough to be good like this so why you are not able to do coding after occurring so kashif told us i would tell you mice take over this so see when you are doing hacker rank it is quite true that yes that is focusing on getting you good okay getting your basics right but when you jump into cold forces you come across some more things like yes there are constructive problems which were not on hacker rank that much and constructive problems initially that bothers us a lot bothers other constructive problems and greedy problems then we move forward then we move forward to something known as hacking phase we come across what is this hacking we are using unordered map and that is getting us a tle ever had discussion yeah yes yeah so your times i'm using another map got an ac in the context next time i'm getting i am getting no points for this why because someone has hacked this why because i have used unloaded money okay so these all things does happen and you need to take care of every small thing in code courses they take up very a large number of corners being corner cases okay you need to take up them okay so just dha is a collection and for loops no dsa is a collection of data structures and algorithms and loops or something and you need to use the data structure algorithm so what headphones are you wearing look stick which one i think he is asking the question question tell me which headphone are you using no it's my friends it is my friend okay fair enough so next one is per day five to seven hours is good to be good at competitive programming what do you think kasha yeah absolutely like five to seven hour is more than enough i would say absolutely i to code it for five to seven hours only i was not a nerd who would be sitting in the laptop the whole day i too will go with me okay so i'm pressure i'm on can you have can you can you have do you have any suggestions for me so get your basics right then move to data structures and algorithms you can if you if you want to gain confidence over that if you want i'd really rush you can try competitive programming too and you can keep moving forward after this point of time you would know that how can i reach google okay tips on how to hold cool and calm structures as yours i would have backed out body structures are yours so you are talking about who me or kashyap let him confirm and then we will talk about okay so that's it from kashyap so uh i think so so let us see sir what do we do okay the next we have a lot of things okay the comments are coming in quickly tell me okay so we have a lot of queries in which language should i code dsa problems so cut ship has done a little bit of bsa problems but i am doing uh bsa problems for a little bit more amount of time because i am in these four initially i was a hardcore competitive programmer so now now for the last past few months i'm doing it so so what if you are decoding only dsa problems then in java and python java python and c plus plus either of them is fine but if you're coding in if you're coding if according to competitive programming totally then i think so c plus plus as a preference what do you think kasha yeah yes because because the whole community kind of not whole community i can say most of the community eighty percent of the community rely on secret space okay so so how do competitive programmers please tell me so i am working as asp.net programmer software so how do i do competitive programmer please tell how can i do both so see you can so after so i have so currently i am teach i am taking the batch of cp35 competitive program and in geeks working so there are many working professionals who are doing parallelly competitive programming as well as the jobs they are placed on international companies mncs and stuff but they are doing it so that's fine everyone can do it just take out your time just like you prepare for any other government service people who are already in tcs can prepare for upsc the same way you can do your your do you can do your software role as well as you can do competitive programming so so what do we do for c and because my english is not good please suggest me too okay i don't know how many days it would take to complete it entirely depends on the it entirely depends on your digestion power how much you are how much your previous knowledge then how much time you are in getting it okay i'm refresher too okay so okay you can leave this if you're done i will quickly okay so i think so because people kind of it is centric on the courses and stuff so that's that was a great that was a great time having with you okay so hope all the best for your future devious thank you sir okay okay okay thank you very much thank you sir okay um which platform should i start off with courtship code forces or leap code uh if you want to do competitive programming you can start off with code courses if you're starting off with dsa you can start up lead code because these are the options you give in uh can i start competitive programming yeah absolutely you can the next one can we my english is not good please suggest me sir you can start off with improving your vocabulary by reading competitive programming questions or dsa questions then seeing the meaning of it in your free time watching english flips and you would be able to do it how many days will it take to complete dsa from geeks for it entirely depends on your piece how much time to figure out approach what would you say to increase speed if you want to increase your pace what you can do is you can keep a timer okay for the first 15 minutes you can think of it suppose you're out of your ideas then see the first line then for the next 15 minutes think with respect to first line then see the second line after the after time interval of half an hour then see the third line after reading four lines see the whole sorry explanation but not the implementation and see the whole implementation of the after consuming one and it would be done so how can we do longer away this is done this is then i understand so i understand the concept but find difficulty in writing the algorithm what to do so if you understand the concept then finding it difficult to write in the algorithm that means you are low on implementation skill so you can practice a lot of implementation problems okay okay okay okay okay instead of whole hardcore work away if we do select problems around it is that really enough to explore whole dsa for interview i don't think so okay that is completely on my personal basis it might create an issue it might create a controversy but according to me just a set of 1800 to 200 problems won't give you that great exposure why because i have a solve count of more than a thousand seven hundred encode forces are alone uh my geeks for geeks work profile i have around 300 problems personal profile have around 300 problems 100 problems of the lead code so more than solve count that are endless problems and that did hacker rank also so see so it entire suppose you're solving a lot of problems you are seeing every dimension of it you know that yes this problems require this yes this problems require this so 180 180 to 200 problems won't teach you that great dimension of competitive program won't show you the true colors of dsa okay like you would be able to see all the basic colors and you would be able to fill the wardrobe but to be a very good experience thing like yes you can see a code and you can do this okay i think 1800 80 180 to 200 problems is not enough of course there might be an exception of course but not the case with me it's absolutely my personal review i'm not getting into anyone's oppo oppositions any youtube channel for dsa in python yes there is geeksforgeeks youtube channel for python okay i have a habit of knowing how to do stuff but unable to copy the logic of the problem itself what do you think will better how much time shall i devote daily basis so in daily basis it entirely depends on the time you are suppose i was in long term so i was able to devote around eight hours so if you are working professionally you can devote around two to three hours if you are a college friend you can devote around four to five hours it entirely depends on the lifestyle group process okay how to start problem solving in dsa if you want to start problem solving in dsa start off with competitive programming okay so facts i learned java and only i want to jump in ds but seeing all the codes that solving it so i find difficulty in understanding it yes absolutely i was ic student so i already knew java so i started off with java but then i saw that everyone is coding in c plus plus i was having a difficulty then i had to switch to c plus same with me no that is not an issue if you are good with any one language you would be able to switch it in just a few difference between comparative programmer difference between complete competitive and dynamic programming what do you mean by this dynamic programming is a topic of data structures or algorithm and competitive is not a topic you don't know so sir writing code and notes in notebook plus implementation is computer is good for dsa or only implementation in computer is enough it entirely depends okay entirely different suppose you are you are doing interview specific problems then you can write the approach in the notes also but if you are doing problem solving then writing the implementation is enough any specific topics from data structures data structure which can help to crack the triology coding ground any specific topics from data structure they would be asking hard level questions that is tomorrow at 12 if i'm not sure okay it taught me more than what i learned in three things this channel has taught me more than what i learned in three years of my education sure i try to try to have learned from geeks for kids trust me as competitive programming required to track man you know might be a try it can work as you a boost but it is not frequent there are people who have cracked it very elegantly without competitive programmers without computer programming and there are people with a lot of competitive programming they have not been able to crack it okay so that is not the scenario do i have to jump in c plus because orders of the essay my suggestion you should do that can we use c plus d s c for dsa yeah absolutely you can do c for dsl i have passed out i have passed last year and almost but still i'm jobless do you think still it is possible to pursue dsm cracks or is it like no it's not late absolutely it doesn't live so when i started off in my first year i started off with web development but when i

Original Description

Geek-O-Lympics 2022 is LIVE now. Explore now: https://www.geeksforgeeks.org/geek-o-lympics/ Watch this mock interview to evaluate your strengths & weaknesses alike. A great way for self-examination, make sure to formulate your tactics before your next interview! In this webinar, we have Kashyap Panchani, who will be interviewed by Siddhartha Hazra, mentor at GeeksforGeeks. For Complete Interview Prep , visit - https://practice.geeksforgeeks.org/courses/complete-interview-preparation?utm_source=youtube&utm_medium=courseteam_main_desc&utm_campaign=live_mock_dsa Fill these forms to share your webinars with us: Interview Experience https://forms.gle/YLG5C8d6SJ6adbCQ7?utm_source=youtube&utm_medium=courseteam_main_desc&utm_campaign=live_mock_dsa Live Mock https://forms.gle/Kf6WgHrFYsrjjEreA?utm_source=youtube&utm_medium=courseteam_main_desc&utm_campaign=live_mock_dsa Follow us on our social media handles to stay updated! Instagram: https://www.instagram.com/geeks_for_geeks/?hl=en Twitter: https://twitter.com/geeksforgeeks​ Telegram: https://t.me/s/geeksforgeeks_official #codingpreparation #coding #techincalround #datastructures #MockInterview #InterviewPreparation #LIVE
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from GeeksforGeeks · GeeksforGeeks · 0 of 60

← Previous Next →
1 How I got into Walmart | Shailesh Sharma
How I got into Walmart | Shailesh Sharma
GeeksforGeeks
2 Upgrade yourself In 29 Days | GeeksforGeeks
Upgrade yourself In 29 Days | GeeksforGeeks
GeeksforGeeks
3 Learn AWS Fundamentals For Free
Learn AWS Fundamentals For Free
GeeksforGeeks
4 Conversation With Young Achievers | Meet the winners of Bi-Wizard Coding Contest | GeeksforGeeks
Conversation With Young Achievers | Meet the winners of Bi-Wizard Coding Contest | GeeksforGeeks
GeeksforGeeks
5 Meet The Winners Of Bi-Wizard Coding Contests | GeeksforGeeks
Meet The Winners Of Bi-Wizard Coding Contests | GeeksforGeeks
GeeksforGeeks
6 Interview Prep Strategies | PayPal
Interview Prep Strategies | PayPal
GeeksforGeeks
7 OLX Interview Preparation Strategies | Hukam Singh
OLX Interview Preparation Strategies | Hukam Singh
GeeksforGeeks
8 Meet Some More Winners Of Bi-Wizard Coding Contests | GeeksforGeeks
Meet Some More Winners Of Bi-Wizard Coding Contests | GeeksforGeeks
GeeksforGeeks
9 Live Mock DSA
Live Mock DSA
GeeksforGeeks
10 Microsoft Azure For Absolute Beginners
Microsoft Azure For Absolute Beginners
GeeksforGeeks
11 Python for Data Science | Data Science Master Bootcamp | Arpit Jain
Python for Data Science | Data Science Master Bootcamp | Arpit Jain
GeeksforGeeks
12 Getting Started with Data Analysis | Data Science Master Bootcamp | Ashish Jangra
Getting Started with Data Analysis | Data Science Master Bootcamp | Ashish Jangra
GeeksforGeeks
13 How to prepare theory subjects for SDE interviews | Geeks Summer Carnival 2022
How to prepare theory subjects for SDE interviews | Geeks Summer Carnival 2022
GeeksforGeeks
14 Get Your Tickets To The Geeks Summer Carnival | GeeksforGeeks
Get Your Tickets To The Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
15 TED Talk Data Analysis Project | Data Science Master Bootcamp | Ashish Jangra
TED Talk Data Analysis Project | Data Science Master Bootcamp | Ashish Jangra
GeeksforGeeks
16 How I Secured AIR 9 in GATE'22 |  Tushar
How I Secured AIR 9 in GATE'22 | Tushar
GeeksforGeeks
17 Learn Java Backend Development | Geeks Summer Carnival | GeeksforGeeks
Learn Java Backend Development | Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
18 How to Recognize which Data Structure to use in a question | Geeks Summer Carnival | GeeksforGeeks
How to Recognize which Data Structure to use in a question | Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
19 Learn Data Structures and Algorithms | GeeksforGeeks
Learn Data Structures and Algorithms | GeeksforGeeks
GeeksforGeeks
20 Interview experience at Flipkart | GeeksforGeeks
Interview experience at Flipkart | GeeksforGeeks
GeeksforGeeks
21 Lets Prepare for GATE'23 the Right Way | Sakshi Singhal | GeekSummerCarnival
Lets Prepare for GATE'23 the Right Way | Sakshi Singhal | GeekSummerCarnival
GeeksforGeeks
22 Highest Paying Jobs in 2022 | Ishan Sharma | Geeks Summer Carnival 2022 | GeeksforGeeks
Highest Paying Jobs in 2022 | Ishan Sharma | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
23 Geeks Summer Carnival 2022 | 5th April- 11th April | GeeksforGeeks
Geeks Summer Carnival 2022 | 5th April- 11th April | GeeksforGeeks
GeeksforGeeks
24 Preparing for SDE interviews | Soham Mukherjee | Geeks Summer Carnival 2022 | GeeksforGeeks
Preparing for SDE interviews | Soham Mukherjee | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
25 Full Stack Development with React & Node | Utkarsh Malik | Geeks Summer Carnival | GeeksforGeeks
Full Stack Development with React & Node | Utkarsh Malik | Geeks Summer Carnival | GeeksforGeeks
GeeksforGeeks
26 Introduction to Open Source and Roadmap to GSOC 2022 | Geeks Summer Carnival 2022 | GeeksforGeeks
Introduction to Open Source and Roadmap to GSOC 2022 | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
27 Web Scraping in Action | Geeks Summer Carnival 2022 | GeeksforGeeks
Web Scraping in Action | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
28 Getting Hired at BITCS via GfG Job Portal | Get Hired With GeeksforGeeks
Getting Hired at BITCS via GfG Job Portal | Get Hired With GeeksforGeeks
GeeksforGeeks
29 How to build a faster landing Page | Geeks Summer Carnival 2022 | GeeksforGeeks
How to build a faster landing Page | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
30 Geeks Summer Carnival | 5th To 11th April, 2022 | GeeksforGeeks
Geeks Summer Carnival | 5th To 11th April, 2022 | GeeksforGeeks
GeeksforGeeks
31 How to get ideas for Startup | Geeks Summer Carnival 2022 | GeeksforGeeks
How to get ideas for Startup | Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
32 Journey from Tier 3 to JusPay | GeeksforGeeks
Journey from Tier 3 to JusPay | GeeksforGeeks
GeeksforGeeks
33 Geeks Summer Carnival 2022 | GeeksforGeeks
Geeks Summer Carnival 2022 | GeeksforGeeks
GeeksforGeeks
34 Dispelling Myths and Pre conceptions of Programming Languages
Dispelling Myths and Pre conceptions of Programming Languages
GeeksforGeeks
35 Must Do System Design Questions
Must Do System Design Questions
GeeksforGeeks
36 Understanding Sorting Techniques in an hour | Keerti Purswani | Geeks Summer Carnival
Understanding Sorting Techniques in an hour | Keerti Purswani | Geeks Summer Carnival
GeeksforGeeks
37 Get Hired at NEC | Job-A-Thon 8
Get Hired at NEC | Job-A-Thon 8
GeeksforGeeks
38 Journey from Tier 3 college to Microsoft | GeeksforGeeks
Journey from Tier 3 college to Microsoft | GeeksforGeeks
GeeksforGeeks
39 Get Hired with GeeksforGeeks at SuperK | Job A Thon 8
Get Hired with GeeksforGeeks at SuperK | Job A Thon 8
GeeksforGeeks
40 GeeksforGeeks: Redesigned
GeeksforGeeks: Redesigned
GeeksforGeeks
41 From Tier 3 to cracking multiple interviews | GeeksforGeeks
From Tier 3 to cracking multiple interviews | GeeksforGeeks
GeeksforGeeks
42 Live Mock DSA
Live Mock DSA
GeeksforGeeks
43 Youtube Data Analysis | Ashish Jangra | GeeksforGeeks
Youtube Data Analysis | Ashish Jangra | GeeksforGeeks
GeeksforGeeks
44 DSA Self-Paced Course Preview | Sandeep Jain | GeeksforGeeks
DSA Self-Paced Course Preview | Sandeep Jain | GeeksforGeeks
GeeksforGeeks
45 GATE Live Classes | Prepare for GATE CS 2023 | GeeksforGeeks
GATE Live Classes | Prepare for GATE CS 2023 | GeeksforGeeks
GeeksforGeeks
46 Journey from JIIT to Adobe
Journey from JIIT to Adobe
GeeksforGeeks
47 Life Is Unfair Ft. Shonty badmash | LIVE Discord Session | A GeeksforGeeks Exclusive
Life Is Unfair Ft. Shonty badmash | LIVE Discord Session | A GeeksforGeeks Exclusive
GeeksforGeeks
48 Interview Experience at Google | Tech Dose
Interview Experience at Google | Tech Dose
GeeksforGeeks
49 Live Mock DSA
Live Mock DSA
GeeksforGeeks
50 Interview Experience @ Amazon | GeeksforGeeks
Interview Experience @ Amazon | GeeksforGeeks
GeeksforGeeks
51 My journey through the tech world from India to US | Vidushi | GeeksforGeeks
My journey through the tech world from India to US | Vidushi | GeeksforGeeks
GeeksforGeeks
52 Complete Interview Preparation Course | GeeksforGeeks
Complete Interview Preparation Course | GeeksforGeeks
GeeksforGeeks
53 Live Mock DSA
Live Mock DSA
GeeksforGeeks
54 Getting Hired at FiftyFive Technologies | Job-a-thon 9.0
Getting Hired at FiftyFive Technologies | Job-a-thon 9.0
GeeksforGeeks
55 GFG Karlo, Ho Jayega | GeeksforGeeks ft. Khaleel Ahmed
GFG Karlo, Ho Jayega | GeeksforGeeks ft. Khaleel Ahmed
GeeksforGeeks
56 How I got job offers from 2 big companies : Arcesium & Microsoft | GeeksforGeeks
How I got job offers from 2 big companies : Arcesium & Microsoft | GeeksforGeeks
GeeksforGeeks
57 LINUX for Beginners | GFG x Itversity
LINUX for Beginners | GFG x Itversity
GeeksforGeeks
58 My interview experience at Walmart | GeeksforGeeks
My interview experience at Walmart | GeeksforGeeks
GeeksforGeeks
59 Get Hired at Speckyfox
Get Hired at Speckyfox
GeeksforGeeks
60 Live Mock DSA
Live Mock DSA
GeeksforGeeks

Related Reads

Up next
THE NEW FEDORA HYPRLAND SETUP OF 2026 (Must TRY)
Ksk Royal
Watch →