How Do FAANG Companies Grade You in Technical Interviews | Soham Mehta | IK UpLevel MicroClass

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] you are in the interview kickstart session my goal is to show you how interviews are graded technical interviews are graded my name is soham where I also just joined we are the founders of the program Steph and Katie from from Arabic start also online today all right a little bit about me currently founded and will kick start most recently right before this I was a director of engineering at box and also very early engineer their box as many of you know I was one of the fastest-growing SAS companies on the planet for several years in a row I was a I was very lucky to be a fifth engineer there and when I left I was a director of engineering and I left at the time of IPO before that I was earlier at eBay as well and also I was I was at Microsoft I work at a start-up I've had and I also worked at a midsize company so I've had I have an experience working in all different kinds of setups and my career it's very standard education master's in computer science and 15 plus years in the field but what is more interesting is my interview related experience have conducted countless tactical interviews by now lots and lots of offers extended from my own budget I have I made offers a rescinded offers I have revised offers I've lost people to googles and Facebooks I have gained people from googles and Facebooks the whole whole nine yards I have stressed about them right I've had other people stress about them an entire process have lived through it from all corners i've have company said interview processes as well and as we move extrav a fairly well connected in the in the tech hubs of the US and there are there are directors and VP's of engineering who are very sensitive to interview processes so so they have helped them to have helped hand under screen candidates management trained scores of interviewers and coached countless software engineers this is something that I cherished the interviewing bein said I have is what I cherish the most I have I've been connected with interviews forever seems like my mind has been tuned to that for a long time let's let me ask you a couple of quick questions and and feel free to put it on chat if you would like why do companies even talk to you at all right they could just look at a lead good profile but they could just you can just look at a hacker right profile right they could have send you the hacker rank test or some other random test right and just give you an awful letter if the best case is paths why why don't they do that thing after all it is so time-consuming and costly to actually interview someone right you have an entire elaborate process for every engineering position and these companies hire big ones especially hired thousands and thousands of people every quarter right you can imagine the recruiting machine that it means why do they invest so much in the recruiting machine can gain an even estimate the amount of dollars companies spend on each face-to-face interview any any any any customers you can you can put them in chat and Kate running it each interview in this has not in filling the position right if I am the candidate right this source me right they respond to my emails they pick up the recruiter phone calls right then then they follow up right then there is a technical phone screen like they were scheduler technical phone screen to find an interviewer and make sure they have the right environment to do the technical phone screen and then then they have to find find the end of your find or the feedback for me right then they have to bring me on site there to schedule all the all the interviews on-site right and then to set the interviews at the back of the hiring figure out what the panel should look like then they have to like juggle between interviewers look at the schedules and say yeah at this day that can happen this day that can happen then they will come back to me and say so these are the days that we can do interviews on and then I would say no and then they have to go back again and come back and do this set the manner then they are there to receive me when I go there and today I suppose I don't go anywhere but but when we are not in lockdown I used to go and they would receive and then they were like reserve the room take you from one room to the other then there is lunch and then you send off right after you start an that's a massive expense I'll tell you how to how to how to judge that it depends on it actually depends on the level you are interviewing very interesting you like for example companies are very thoughtful about the interview process they will put their in the interviewers would be higher than the position you are interviewing for so if your interview for L Phi which is senior engineer at Google Facebook they would put L sixes and L sevens in rare cases therefore L files but but but but practically never l3 is for example it L force they may be if the recruit doesn't know and stuff but generally the same level or or higher so so higher you go the more expensive it is to interview and obviously the higher you go the number of positions also shooting so the dollar volume remains the same but think about this thing l6 at Google starts at four 50k a year for 50k a year is two hundred and twenty-five dollars an hour so so right off the bat just two hundred twenty-five dollars an hour are spent by that interviewer to interview you if you are at L 6 + sorry if you are into identify the l 6 percent interviews UL 6 percent Arndt's $225 an hour and in single day plus all the interruptions that they have to take it plus all the feedback they're there to write and conversations they have to run again count another R that's like $450 but per person minimum plus all the interruption and the they had from their work there are statistics that that one minute of interruption can cause 15 minutes of delays and this is like a massive interruption for it so when you have one interview in the day like a third of your knee is gone so the in the cost of interruption is just massively high so so yes roughly about roughly about five figures is is in the ballpark few thousand dollars per candidate that they spend why the hell do they do that and it's not like the candidate is gonna get an offer enjoy it right so might might not get an offer and so even if it gets an offer you may not joined and by the he'll go through this entire process why not just send four problems to some have the test cases pass and generate the offer letter and call it a day [Music] you see you got you could say do it like you have you have to talk to so um right you talk to the person what's what's the point here hey the point is if you just wanted to talk to so how or whatever any candidate today is that you could just send them the question to tell the test cases past bring them on site for an hour or two late have fun lunch dinner eight people and get up why can't we do that see you don't do that right I mean they're not dumb people of all the people right these guys are not dumb right so they they always heard about this the point is that they want to see your thought process when you are challenged how do you think when you are challenged how systematically do you think when challenged is really the point when I am at lunch and dinner you're not challenging me when I'm just having having a chitchat I'm not being challenged right then when you are posing a problem at me is when I am challenged and you want to see how I react right what are the thought processes what are the questions that come to my mind and what is like how do I logically go from one step to the next and finally arrive at some that that works for the situation presented that is what they want to find out now because of that they take on all this cost and the how do they find that out right when I am in the interview I am the candidate and you are the interviewer what you are looking for is signals it like signals from Soham I am presenting a problem to so on and so am I saying stuff what is so I'm bringing out so in any and when the signals come out how do you actually stratify the signal state how do you tell that one candidate is better than the other like one thing you do is you ask the same question or very similar question but then what then what like what is what is it that tells you that this candidate is better than the other that is why there is a grading scale in every single interview so what happens is and and some of you already know this what happens is that every company worth its salt has a grading rubric for every single interview there is a 45 minute to an hour interview the interviewer interview talks to you asks a question right all that jazz happens the moment they exit that room or the Xoom call right or whatever call facebook uses blue jeans and Amazon uses a chime and and whatever their own products are the moment they exit from there it give you a grade there is a grading scale in every company they give you a grade they don't tell you the grade no recruiter will ever tell you the grades grades are highly confidential they can't link it can give you some feedback but that's all that is the real feedback is in the gradation and every company has its different grading scale LinkedIn follows a ten-point scale Amazon follow the four point scale box follows a five-point scale Google follow the six point scale and so Google is to follow decimal scale for a long time so and they kept on evolving it I today I'll show you a grading scale I show you the idea in a grading scale and then we will take a problem one of my favorite problems there and I'll make it more real for you let's see so here is a grading scale here is what companies are trying to if the interviewer gives you a 1 then that means that interviews that completely off straight it's like it's like if I am the interviewer like I was talking in English you're talking in French like I could hear you you couldn't you could hear me a complete two different planes it's like good lord I will I will fight for you do not be in this company that's a one who is that you tried something like I can see that you you wanted to solve something to solve this but you know there was no urge for efficiency or if there was or efficiency there weren't there weren't good ideas on the table you just stopped close to some sort of a brute force solution so the most obvious brute force solution right you stop that's like it 2 then 2 plus is like good effort now I can see it was better than 2 like you it wasn't good enough right I don't think you reach the wedge where I wanted you to reach good effort though like I admire your effort yes we've all been in situations like this where where we admire somebody's effort right not just not just pleasantries I'm not talking about just pleasantries hey good job no no no like wow like you tried like that is what the 2 plus is you didn't get there but you know what I'll take an ode to you try that's 3 is like good enough like you tried you reached you checked all the boxes right good enough for is like god this wasn't inspirational right like when do you start that is that is amazing it wasn't just good enough right for is like it was like we made a connection right I'm inspired by you I would - love to collaborate with you on technical matters right just let's start I'm going to be the champion when they interview the panelists are discussing stuff I am going to be your champion that is what four is and three is like good enough so what happens is then generally speaking for three and four and you get hired the decision is higher right so then let's say there are five panelists in the interview then they discuss the performance they discuss the performance everybody puts up their numbers to say I give a 3 or 2 or a 2 + or 4 or what if generally everybody gives threes and fours there is no debate the candidate is clear right yeah okay let's make an offer and then it is between the hiring manager and the recruiter for to find numbers is perfect that somebody gave it to plus or a2 then a discussion ensures there is like a proper group debate happens and sometimes the debate is intense sometimes the debate is long I've been in debates for hour and a half for a single interview at that point of time the person who gave you four defends you like they take one stand and the person who who gave you a one take the other standing one is very rare so usually it's like two two plus the person if you've got a for that person defends you in that conversation if you've got a three the person does not defend you if you got if if say if say you only one person give you three the other three other we will give you do plus they'll just give up and say man ok fine you give all two pluses I was three so at four remained champions in the company for you generally speaking you can statistically proven that good candidates can be wrong once like one interview can go back to interviews cannot do that two interviews and you will not get enough but generally there are two people in a room who have given you tools or two pluses doesn't anyone so [Music] so this is a very human process is this is the point I'm trying to make here Internet has made us feel like it is about test cases passing and stuff like that it's actually not the case you may not come up with deemed by far the most optimal solution to your problem but if you presented your your case and a thought process in a proper manner and you made the connection of the interviewer you will still see it through we all know people who are who we wonder well how the hell is this person at Google or Facebook great they are not that taking very strong or like this look at that other other other girl or a car like the that person is so technically strong and and they failed is actionable that that that problem that issue is this is it is a lack of understanding of what interviews actually are now and I can we we obviously go very detailed into this and we have a detailed feedback form I will not go through all the nylon go through the entire feedback form at the moment but but I I'll show you a little bit you give you a technical score right we also give you a behavioral score obviously maquis reviews are just one part of the entire process if you have several other things you we have intense live classes and homeworks and tests and all that walking music wait but one part but but we take it seriously we separate a technical score from the behavioral score we have a behavioral as well because we want to be able to tell you things like awesome technical performance but watch you were arrogant so those are the things that we don't we don't want you to see we want you to like put a finger on it and say buzz fix this and then we dive into technical side of things right all the little things how many hints did you have do you see like it's not like one hint is is good enough and who is not it is more about what about what did I feel at that time and then and then at that moment as that interviewers for that problem and for that performance did I feel that two hints was too much then I would say yes more than I would have blinded all right I go to the next interview ask the same question it's a different person different performance right and different hour of the day I feel like may have five minutes sure that's fine just nothing's it is not in your hands this is not in your hands all right those rubrics that there is no gradation on this that's where the interviews are a date as much as they are a test remember this that will help you forever when you think about an interview and again we keep going into depths of technical grading we keep going next into behavioral grading as well and how confident did you appear to start writing code without thinking what was the energy level like for example some people have just habit really low energy or there are low energy because the cultural norms make them low energy right low energy is modest and such but you know you are in an interview like you can't be modest right all right you can't be do high energy also but you can't be pushover as a senior engineer especially you can't be modest you can't be arrogant you have to know how to prep deadlines and so so we actually you actually likes us that out and say this was low energy low energy in an interview is is being a pushover curiosity level humility did you feel the kind of word car so all these things will bring out in now let's try and make this more real let's do a problem this is I've have several problems over the years that have made it to my list of favorite problems and least favorite problems as well this is the upcoming problem is one of those problems this problem ism is easy to medium-range problem some of you may already know how to solve it but that is not the point that I'm trying to make some of you have never may not may have never seen this before right and in and that is also not the point I'm trying to make I will solve it with you right for you with you and in the next 20 25 minutes and my goal is to show you the gradation you see if you go this far boss that's a - if you go this far it is a 2 plus you go this far it's it's it's a 3 you go this far damn it's a 4 so I want you to I want you to exit today with a very clear understanding that there is gradation the gradation is subjective but there is still some method to this madness and why the gradation happens ok so now let's try and solve this what I'm going to do is I am going to just write a write inside the slide here ok given n strings return groups of anagrams now this is arguably a slightly vague problem statement the right of the bat some of you will know that so some things are missing then I present this problem to you what are some of the questions that you will ask me give me give me something to just begin begin with I don't mean to spend two hours on this but still give you something to begin with so I can actually guide the room in the right direction [Music] what is an anagram excellent I wish example input-output yes saga very very good two questions what is an anagram now in trying to ask what is anionic um some people feel very shy right I should know Danny comes are and some people terrifying questions yes I have seen many people not ask clarifying questions because they assume anagrams are palindromes and I got for not telling ropes so let me give you input/output example as well right you can and should ask can you please give me an example that is what is called that is what is called controlling the interview in the sense I do give you a problem but you are controlling me now right I just presented a problem I if it's a tennis match I hit it now the ball is in your code now you can draw right that's stadium now okay so input-output example I'll tell you what I Ana Gramps it is okay if you don't know what an accountant write the word anagrams have any grams of words which are the same length and the same letter so what's a te EAP and TE a there are anagrams of each other example obviously there are many many many more examples like stop parts dogs there are also anagrams of each other right so this is one group of anagrams this is another group of anagrams so now you're given n strings and and now you're supposed to fine anagrams and return groups of anagrams to me my goal is not to my goal is not to not to write elaborate code right now my goal is to drive a point home okay so first two very basic questions came about excellent let me let me tell you what I am looking for an outright I will tell you that all the strings are of the same length and let's say the strings are length cake all the strings are length k yeah they may or may not be part of dictionary doesn't really matter and if I give you if I give you a jumble of words like this they can be any order right it doesn't really matter so let's see sto okay say I give you this then I want [Music] 8080 EE a right as one and then just [Music] reduce the size and I want to see sto TS gos okay that's that's what I want to see like I want to see the first group first then the second group second right ideally and I want to see something like Group one right some sort of a lookup table right just a group one has a de two like that through three and yes there may be what about case sensitivity excellent question look we are not generating any grams you are just given something all you are doing is grouping them and returning them that's all this is what I ideally want you could negotiate a slightly different output also you don't have to be valid word they don't have to be part of dictionary none of that okay for now let's just let us say just this and then any other words after that a following we are not generating any grams so we are not making permutation CS anagrams of permutations and I feel you are absolutely correct we are not generating them we are accepting them as they are and we are simply grouping them coming come out now at this point we know that also all strings are length K right should the groups you sorted no need no need no I just want them group that's it all I want is I want them group doesn't really matter like it he could come first that's also fine good question very good question and this is okay but always ask clarifying questions if you don't ask clarifying questions what do you get what do you get [Music] you got to one or two if you are don't ask terrifying questions and you are not able to solve the problem obviously you would be speaking in different languages you got a one if you don't ask clarifying questions and you just blurt the solution out of the board obviously I know that you have seen this before you're not admitting it you get one a maximum to have to ask clarifying questions and even if you happen to know the problem right if you admitted what I've seen I might have seen something like this before maybe in practice or a different company leave it vague and then when you ask questions we'll ask some presumptive questions that some you don't want the groups to be sorted record you know what the groups will be sorted right like that way instead of asking you should be sorted so you know you don't want to be sorted right presumptively here is my favorite question and the most annoying one also so I know no offense ever but is there any time complexity of space complexity I have to consider please for the sake of Lord do not ask that you do not ask that the game is not to chase at certain time complexities and stuff it is not like here is the input here is the output no no the game is you know your thought process so I want to see whether you chase certain time complexity and space complexity or not do you justify that this is the end of it you justify to you and me that there is something some other improvement can happen here like do you have that sense that this can be improved further that is critical guys don't ask that good companies don't know there it is interview will not show their annoyance like I just showed it maybe not but this will not go well the idea is to solve the problem oops some of you are writing in the Q&A section and some of you are writing in the chat section this is so there are like two different purposes there are these two things are held with Q&A section is when you have a question that you would want me to answer later after all this while I am discussing this problem and it is like live conversation it might chat might be more useful just a fire obvious I will I will take questions on both sides right towards the cue any questions I'll take it towards the end but Chad might be just more conducive for live conversation now coming back ask clarifying questions you don't ask clarifying questions one or two if you ask this time in space complexity it's like most interviewers I know will be like oh right no please don't like there they're there to help you but like not like that okay now at this point you have to start solving the problem we asked about case sensitivity and grouping the input out to help unicode not unicode good question good question not unicode right i'll say you know that's not what unicorn asking just ask is fine I would only give you asking characters and strings very good question well now you are starting to solve it when you come to a Unicode is like moon now you're starting to actually solve it so how do you solve it the first you think about it right let's say let's say you don't do anything of demands the most brute force solution would be take the string right save it take the second string compare the two strings and say are there any grams of each other if they are anagrams of each other you say okay hook the third string right and and then you take that third string and you match with every other string that you have seen and say are there any counts of this if it is you group it right then the fourth string match with everything else that obviously solves the problem right and when you when you how do you compare two strings and with each other just compare character by character like the most brute force solution let's you're not able to think of anything else you given a whole bunch of strings and you keep comparing one after the other one after the other one after the other every new string comes in you compare with everything else right what is the what is the time complexity of that solution complete brute force solution anyone N squared yes N squared K squared right because the absolute brute force of comparing two strings you have K and you keep comparing each letter within it and yes you can yes you can improve from K squared but like order n square N squared K squared so good force N squared is square now what if this is the only thing you were able to think or if the question is should I be writing code for this good force solution right no you should not be writing code for the brute force solution unless this was the only thing you want you were able to think that you are at end of the interview the interview is that book if I write something and show otherwise otherwise don't write good force but there is a massive benefit to writing brute force the massive benefit is that now I understood that you've understood the damn problem you understood the room so my job is done I you you pushed me to a certain level in my delivery when I realized that if my job is done that you fully understood the problem until then as an interviewer I couldn't couldn't tell at all right whether you fully understood the problem so now you good for solution is out right don't code it verbalize it move on when you present force you know that you're not going to get a one you may still get it too if you don't try hardware after that but but you've started to move right now [Music] another good question I see on the chat can extra space be used or like can I just can I just market the strings that are there are coming in excellent question I don't want it to mock the input the input is read-only allocate new output for it so you will have to use direct that much extra space that is okay I am allowing you to do that because I don't want you to mark with the input that input might be going somewhere else also in the function I'm going to pass you by reference and then the input is going somewhere else now so the brute force solution is out now now you have this fleeting feeling here and you know maybe this is not the most efficient there's something else that can be done here that feeling is critical feeling force that feeling comes that feeling comes after practice when you've seen several of these things is when it comes to you that you know this can be there's no antidote to practice now obviously more run this is better right there is really no end to it in that sense but you can practice more intelligently as well and you can practice with patterns you can practice fewer problems that open up doors for other problems that's what we do it I came but anyway besides the point now there is a fleeting feeling in my head this can be proved how can how can I refuse like the act of finding whether new strings are anagrams of each other seems to be inefficient I shouldn't need to compare everything I should need I could maybe use a hash table some lookup right I could look it up I if I if there's a new string that comes in right can I just look it up whether that is a tram that is that is that one of the existing groups here so which means I need something that is common to anagrams what is common to allografts now maybe use a map yes yes but what is common to anagrams if you see anagrams it eat eat ate right what is common to the Grahams same characters right so when assorted yes well it Arjun you actually write when the strings are sorting sorted they will end up being the same and frequency could also be the same let's say you're not able to think of frequency for a second whoa first sort JEP and all the same right so why don't I try that get a string sort it right stick stick that sort sort that string as a key into a map right so in this case a été lets us do a sensitivity for a second let's keep that aside for a second I understand makes it slightly more complicated but let's discuss that a bit later let's let's try let's try to drive the point home AET is the sorted representation right and then I get the first string I sort it stick it in then I get the second one we just say EAD and I sort that also and I get a et and then I look up in the lookup table so eighty exists which means this just goes with this growth and then sto comes sto comes I sort it I say okay OST is the sorted string right now OST doesn't match AED so that means it's a new group ok new group starts that's fine and then comes te a and then I started again so e AE do this one matches AAT that you'll first try to put it than EAD right [Music] aha then OTS comes OTS matches the sorted of sorting of OTS is a can OST it matches this and then tus comes similarly shouting matches aside so I look up it's a map sorted string to all the anagrams that sort to the same string now they arrived at this point I will check whether this is more efficient fields more efficient train fees more efficient because you have to only go through the entire list once you don't have to compare all strings to all other strings so what is the time complexity of this solution we sorted the string we sort each string right we become we do our lookup into the lookup table as per order of n k n log n we and run my new spot on so when you sort something the canonical way of sorting canonical time complexity of sorting is is is K log K if there are K characters in a string I said length K so in order to sort a string you will spend K log K time and then you will do that for n different strings right so K log K times n right n K log K now you will look up a lookup is is constant right not always when the hash table is big it is not constant remember that but let's let's part there for a second rectum NK locking and there is some cost to adding read appending district review tomorrow you have a different one for this you need to obtain narrate you need to append set Dae comes you need to append there's some costume of pending right so so it that cost depends on the data structure you choose for the value here there is a key and then this whole thing is the value right this is a map he set up key and the value key and the value the data structure you use for values it dates how many like what is the cost of appending for now let's let's say what which okay let me let me pose a little closer question what is the data structure where the cost of appending is constant link is very good yes yes excellent link list excellent the cost of appending is constantly linguistic now in Java array list also amortized it's fine but but linked list very purely cost of appending is constant so let's let's assume then you use the linked list here and the cost of appending was constant so so so you look through the strings you sort each one if you don't find it that in the map stick it in has the key the sorted representation right and and in itself and then take the second one see if you find it appended otherwise created time complexity NK log in space complexity is this entire table right now I didn't give you a choice to into to muck with the input so you will have to you have to create a new one so the space complexity the minimum space complexity is going to be n K because I asked you to store all the strings again n times K but your additional space complexity then you will use in order to use in order to solve the problem with this method is going to be first case again NK because inverse is there may be no and you have sorted representation and and extreme short residence training and then n times all strings are their own keys and then each of them are values so minimum space complexity and it's null space of flexible so order n K okay now now can we do better now again this same so yes we can do yes we can do better that comes with some practice in this case we know that while most algorithms are K log K store T can also be done in order K on linear time that is a lower bound on sorting is there a way to do more efficient sorting if you've done several sorting problems which is the first first first class at again you understand that that there is something of a bucket sort counting sort or bucket sort same thing same thing is the same where you ask the question right somebody asks I think maybe asked earlier was it Unicode or not is it a certain set number of characters that is that you're giving us yes I said a ski mask I am only giving you ASCII characters which means there's a certain limited number at this point if I say ASCII if you don't know what ASCII is that is actually a problem that is a problem now obviously ASCII slightly older now has been superseded by a unique mode but simply not knowing what ASCII is thank you okay it's not a make or break in the interview but but Ike it's like rings a bell you don't not asking is maybe you don't know what Unicode is either you may have asked Unicode but you may have asked in a very fluffy manner you don't exactly understand ready for it so I will try and but over a little bit if you ask Unicode or ASCII in such like that I will put a slightly probe as an interviewer say you know what ASCII is right the mapping and you'd say yes so ASCII is there's 256 set including as two extended ASCII 128 is what I'm concerned with and I will tell you I am already comes into the printable character into my characters you may not know how many characters are 128 are printable characters I'll tell you 95 are you can ask right now only 95 characters happen to go first 32 characters are not printable the last one is not printable the rest are printable characters and I would give you like the strings that I give you will be from 95 printable characters now now you know that that there are only 95 characters that the strings can be composed off I'm not saying K is 94 the length can be much higher than 95 but then only tell alphabet size is 95 now can you do better that's the question and yes you can do matter if somebody also presented that earlier we can make a frequency map right what else is common to anagrams we are going back in the thinking process say what else is common to anagrams the frequency of characters is common to anagrams like even in in these three anagrams a happened once G happened once and he happened once so what you can also do is you can count the frequency of how many characters happen happen how many times and that becomes your key not the sorted representation effect and the calculation of how many characters happened how many times is order K order K or or the size of the string or 90 file it's fixed right in this case so how do you do it what you do is use allocate an area of 95 120 let's say you did not know that or you allocate an area of 95 characters in each of them you you figure out the frequency of each character and you keep incrementing that that becomes your you're sorted representation so for example if the if the if the stream was CB a CB double-a CB right the representation would be you would have an array of 0 to 90 for these are characters and my characters what is the assumption we are making not integers because the assumption we are making is that each character will not happen more than a certain number of times so let's say there are characters and it was at 94 95 byte array that was allocated right and and so based on the ASCII value say you could also just to make it easier on you you could just say 127 you have you have an array of 127 128 bytes allocated and the corresponding ASCII value of the character that comes in is incremented so like so for example a small is 95 so the number 95 plus 1 right d is number 96 97 right so and if I will do plus 196 you will do plus 1 97 0 plus 1 so it will eventually it will be all zeroes right and then somewhere it will have 1 1 1 then all zeroes that will be their representation like 128 by representation which is common to the set of n accounts when dat comes same thing ta account same thing out in this case if a sorry double a BB CC comes same thing will happen to result sorry I should say 2 2 2 each and they have gone a little bit too fast but you understand I think it is just a frequency of character set and you you are allocating in character map and for the corresponding ASCII values you are incrementing each of them similarly this will also result in exact same frequency man that frequency man converted to a spring becomes your key inside the array now is this solution better than the previous right so this solution will be something like this right you have this entire map right sitting time for this and this and then similarly a different map sitting part so some other strings right like that I get another map again right all 128 man sitting per year so thats will that will be wrong now is this better than the previous one how do we tell what is one way to tell whether this is bit better than the previous one [Music] in what what sense is it better would it be better time complexity yes we are not sorting yes we are not so we are sorting but where we are we are sorting wait once on a constant array we are not we are not taking the time on to like comparing each character and sort of give you the frequency sort counting sort bucket sort same thing whatever the length of the string is in this situation you are only allocating 128 bytes and you are only going over the string once if K happens to be 10,000 each strings 10,000 characters long right you will still not need more than this very likely and also you will only need to go through once it will not be a long game the time complexity of this will be just K ordered heap right order NK will be time complexity now what is the what is the space complexity of this and is it necessarily better in the same space complexity space complexity is c NK space complexity we are minimum taking in right yes 127 bytes 4 times times n 127 times and because worst case we yes what skills will be n of them correct now there was a question but why I store these zeros very good question very very very very good question can it be a different data structure instead of this array getting a different data structure it can be a different data structure it's possible now that decision is made by talking to the interviewer how many times will will each character happen right here we have assumed one by one by it can store how many one byte can store what is the maximum number you can store in one mind yes 256 correct 255 to be more precise yes exactly so if the character happens more than 255 times this solution doesn't work right so you to ask them to be here because interview didn't tell you anything about King but your sentence of improvement yes you said ASCII yes but how many times each character happens I didn't say anything [Music] it could be asking but could be happening 10000 times and then you can't store that 10,000 a single byte you will need a bigger bigger place so so this is this solution needs a dialogue with the interviewer the space complexity is not necessarily better than the previous one because K could be small if K is very small K smaller than 127 space complexity is not better interesting interesting now if I reduce this problem down and I am only going to give you letters and not asking the problem becomes very simple there is no really trade-offs and such this simple version is actually on lead code somewhere and that is not what the interview will ask you they know that they have done some of you done some of these things so they will twist the problem for you this is a very popular twist of asking the simple twist when leads to lot of dialogue that is what the interviewer is optimizing for friend now if you came about to this solution and then you have this conversation with the interviewer about whether this is an active acceptable solution based on what I had in mind what entry we had in mind about about K this solution is very dependent on K that would be very good and now you are going to a three right you're potentially going beyond three coming to this having this sense you demonstrated said this improvement since twice once you are at n square a-square and then you went to NK log head very good and then you demonstrate it again that is a three okay check the boxes and then you had the dialogue and you had the maturity to say okay K is very small I'll stick to the other one given K is very small log K doesn't really add much while this second solution that we came about is slightly is more time-efficient there's only n K right Zoli NK but it is slightly more complicated to implement so that maturity I like to say you asked and figure it say okay I'll not go there because slightly more complicated now at this point some people what more mathematically inclined would say was prime numbers what else is common what else is common what we could do is if you could assign each of these ASCII characters each of these alphabet characters a prime number product of primes is also unique and so you can take a product if you have if there is something associated with a and E and T you make a product of that and then you have it in any order the product is going to remain the same yeah that makes sense right when you when I presented this very naive looking statement earlier right obviously I am guessing you didn't you didn't think this would go to prime strength and spring student group of any graphs this is interesting make sense but will you implement that solution that's the question that is actually the million dollar question that takes you from 384 you can implement that series you can actually say okay let's find first 128 prime numbers associate 1 each prime number with one of their skeletons ASCII characters look it up and do the product and then the product is going to be unique and that becomes the key in the map but but you realize the time come realize the complexity of implementing a solution right the product of first 20 Prime's will overflow your integer and then you will say ok I'll use long well technically sure you can use long you go you go higher like first like 40 Prime's or something you know long right and say ok so mile use long long int long into long long int ok kick the can down the road anymore in first like ad prime then you go long long int now what now depending on the language you will write a big integer class or use it and stuff where integers are represented by strings all the math happens with strings in there now the question is will you take east complexity on will you take this perplexity on you can take the complexity on if the alphabet is small it's only 26 you could take that to still take the complexity on alphabet is small n K is small if I tell you that K is very small and I am NOT going to give you all the ASCII set only only 26 letters then you can take that on it it will be faster to implement right the run time will be faster because multiplication is faster but what I want you to have that dialogue especially if you have had any experience 3 any 2 3 5 years 7 10 years experience in coding I want that dialogue right if you did not go to prime numbers you stopped at 3 you'll get a 3 with this if you assuming you had this dialogue with me about about what is the size of K and stuff if you had the conversation of prime numbers and you yourself realized that some know this is very difficult I won't actually take that complexity on because the code will become unreadable that this problem does not need this massive a solution that is what pushes before that is how this thing is graded now we haven't even come to coding and then you would write code for whichever solution it is a grade of one did you think is right and when you write code you will not fumble too much everybody fumbles a little bit that's okay not fumble too much but if you just do hand wavy pseudocode right after coming this far you'll drop down there's no urge to write code there's no urge to be detail-oriented and besides this is coding profession you need to be detail okay so that is how this thing is created so very much a date there are other interviewers I didn't make it start who will not will not give you a three if you with you even reach this solution it will want you to wait for you to write code and only if you write code really quickly is when they give you a three or four I don't mind I think when you write then to quickly make more mistakes but if you have excellent clarity in your mind you will not fumble in writing code I've seen that over and over again I don't worry about if I am your manager you come this far I develop a level of trust with you and you have the sense that this can be improved I will not be called in the night saying that there is some real efficient code which touted the slightest flaw that is the trust I want will develop with you that is how I'm gonna graded so again any peek there is a grading scale absolute grading scale on this right one is like when you just don't know what's happening to is like you stride something like in this problem you came to a brute force solution and you tried and nothing really worked after that then you go to two plus when you come to like the sorting solution we don't go beyond that like yeah I realize that you try it but like you there was something else there you were trying to do it but you didn't come to that like two plus five if well try then three when you do there when you come to like this this frequency count and you compare compare that with what is K what is alphabet size all that then you discuss primes and you pick at the right solution go back to one of the solutions and see no this is the right one and so forth that's how it is created so folks that's that's what I wanted to tell you that's the point I wanted to drive home that interviews are closer to a date don't get don't get into this this thing into the wedge of just as cases passing and so finally have to be able to like solve the problem with the interview solve the problem with the interviewer and and that's when you get a good good grade now that's all I had folks I do see some questions so I'm going to take questions here I'm first going to go through the chat and then I want to go through Q&A [Music] we we we obviously didn't go through like very precisely on case sensitivity and stuff right duplicates get sensitivity all that duplicates are taken care of but case sensitivity was not but that wasn't the point [Music] unicode and yeah looks like would use a linked list I really sort of set in case of duplicates generally linked lists my like if if I were asking the question I would I would obviously want the candidate to pick the right leader structure and justify why they're taking that right data structure yes okay now I'm going to do two Q&A okay there's this one one more question on chat and then I'm going to ship the Q&A is folks you can either upload one of the questions on Q&A or put your own is it okay to repeat the question asked to you to make sure you understood the question yes from the character that's fine that's just normal human conversation I don't overthink either you don't know what I think either I mean just do D boolean matrix island problem I got that world might be tool in the yes right at this point to Lindy what do you ask the question in replying to your replies why does this question matter will this never happen yes it's possible if the question you ask is completely oddball they will they will be wondering like why does this question matter and then that is fine you to justify why the question matters yeah if I know the fastest solution to a problem already then should I start with the solution with the worse complexity and work my way up if you know the faster solutions I have just admitted hey I think I know this won't be known to be like overcommitted and don't say of course I know this like hold on one second yes yeah so of course I know this look at this this is the fastest solution that turns people off wait to say hey I may have seen this before right and then ask presumptive questions right you mean yeah you don't need to sort at order right and you mean you mean take you mean that duplicates are okay yes and stop let's so like and then you say it's to see brute force you can do this the other one you can do this like you can do it with with sorting you can also do it with frequency count depends on on the size of K is K is very small or K very big right so so that's that that way you should handle that I hope I hope that helps come to the Facebook various supposed to solve two problems how can you go in depth one question problem is very good question how can you go in depth into generally when you when they ask expects or to question their to medium problems and that's one take this this problem can be solved in 20 minutes with the dialog then you've done enough practice this problem can be solved in 20 minutes that is this is this is quite quite okay sometimes it is one short problem and then one slightly more than medium problem now that takes about 30 minutes but this one 20 minutes but but you still have to you still have to conversate the point is to solve something with you so they can get enough signal out of you this question took 30 or in itself is where too many personnel what connect in pencil yes depends on on your thought process really that that's the thing I mean I was actually I was explaining this thing that's fine in teaching this problem can take I have taken 90 minutes also when I have written code and all of it to just teach this problem right but but when you are writing it when you when you have enough practice actually what happens is if it three you get the sense more quickly does the evaluation differ a favor from a sagar evaluation differs but you know don't overthink all this many people shift from one company you are then back to other and all that and very do we are dependent generally speaking Facebook expect you to write fast code on on easier problems Google expects you to show very mature thought process on harder problems that's like general rod brush but you can't optimize your life like that you just have to practice the only thing in your hand just to practice the rest of it you let it be on them what panel comes to you is is up to you is up to them you are not in your control so good yes instruments same length of them same length assumption is not necessary yes you're right machine you are absolutely correct you know it is not necessary I made several defying assumptions for the problem case sensitivity matters as well yes it does if they think it matters in the sense that it is either either one has to decide whether you want it or you don't want it if you don't want case since today that is there is stuff that you have to do more correct [Music] do we have duplicate strings can take I hope that that is answered duplicate worse answer right when you do frequency count it's sorting a matter is it no anagrams if there have throw exception in turn a bit no not every detail is just written the entire thing assume that there is a group of one is that too many questions should you assume some things and tell them that you assume some things you could yes that is that is right some obvious things you can assume absolutely in online interviews is okay to repeat the question make sure we actually understand the question yes that's fine list of characters once sorted and would it make a difference if I said and I used an array even if position amortize time but I don't say anything around a good question so in this particular case you should say this is why you are using an array because you know that you know that appending you don't want to take the complexity of appending and in in in an array you not get the complexity of appending because of this reason that complexity is better yes it's yes what situation we picked it off in what situation will pick the optimal solution that's best for both time and space the fax receipt John that is the point yet the what is best is subjective to the interviewer and you have to suss that out some problems it is obvious but I do the problems where it is obvious I are either very easy problems or very hard problems for everything in the middle which is about 60% on the problems you you to do so picked it out yes sorry folks looks like my internet connection went off a little bit but Jonah is answering your question that optimal solution is really what the interviewer things is optimal and this is a very particular very interesting very particular problem which is neither too hard nor too easy sits in the middle and you have to suss it out and then so you need to discuss solutions but then it is okay to tell the examined which when I will do answers others may take too long yes yes they fun for the situation is in the interviewers mind what is the right solution that is the what grid is if you mess code for frequent solution but Jane look everybody has not said I have had bugs in my code my interviewers have read bugs in there for your interviewer sitting in the Reubens I had bugs open in there for having a bug is not an issue but leaving the code without finding the bug is there if you're leaving the core with the bottom two plus if I know the prime number solutions start with that solution should go step by step it is yes so mathematically very good question so mathematically inclined people start with start with prime number solution to this but even if you start with prime number solution in this particular case when you know that the alphabet size is 128 you realize that it is quite complicated to implement and if you are a senior engineer right even seen a meeting at two three five years experience even you need to have a sense that boss there is something better here I shouldn't be going to bathroom so so you may start with prime number the but then you come back and say this seems very complicated where do I start can you use different programming language for interviews maybe in the one from Java see the most busy yes yes whether that's fine you can use them in it's entirely fine and if I don't like but there is no this is a massive advantage to it like say if you feel Java is easier for something go for it if you know one feel yes good companies depend on my friend in stations the language reference soaring solving coding question my day jovial showered people say it's better to lead core introvert in Python so garage the idea is that if you are a Java course if you have Java and if you have a few years of experience in Java stick to it like Python is easier yes but but rather is easier for people who don't know other languages to pick up Python is easier that's it but it takes a while to get good at it takes a while to get good at it so if you've had you had enough experience enjoyed like just use that Joe is a first-class language do we have to compile running run it after implementation yes what we will do I mean in the interview depends on the interview here what we'll do is we will give you a link to our software interview kick-starts offer it's called up level and I will set I will set wanna I will set a different problem in there which will compile and run and make the test cases pass and then discuss on the discussion board what do you think 1 & 2 & 3 & 4 is going to be on this I will answer it I will I will chime it I will answer your questions as well we will give you a different problem to solve just one problem for the sake of discussion so sometime today you can expect that if I didn't actually realize the bug and the interview goes through and nos will find a bug I want to find out that my performance grade here yes she really does it does it does now if that is the only thing that happened and else's quick doesn't but if that thing happened and you are already with a 35 minute mark for the problem usually one mistake is not a problem right then second one starts to happen instead of this then signal starts to fall that's when it goes against you if I reach the solution 3 implemented and then had it's hard to solution to interview appearances but it not implement yeah you don't need to implement prime number right you need to without implementation you need to realize if the prime number solution is little too much to implement you don't have to implement you only one not even brute force sorting solution not even implement if you like until until you realize that this is the solution only then you implementation of code if you write it's like and like all you want to do really is loop right take the string it do the processing on it whether it is sorting or whether it is like frequency counting stick it into a hash table if it is not found right and a pen that's it that's all that is doing they will take the next change so there is not that much work in terms of coding it so when you to realize that this and you needed one solution some companies when you wanted a runnable code and looks a lot of time for correcting syntax the even if the logic is correct yes it is it is important to have the urge for precision right it is ok to not remember the exact syntax but it is not okay to say that I will just leave the code somewhere and maybe there is a bug here in there and you are thinking about interviewing and becoming a part of solve the strongest technical teams on the planet those teams are very prideful and not as forgivable they don't forgive very quickly and so so you have to like you have to you have to rise to their standard sometimes the standard is just just the whiteboard right that's fine and that's the standard and that's okay sometimes the standard is renewable code then then you do rise to that standard right at the end of the day you want them as much as they want to you right so so unfortunately you rang it there do you agree that getting positive is less likely when you have not seen similar problem even that you have less rolling too random I never won yes yes yeah you don't have to see the exact problem you get you have to practice enough such that you have proper proper patterns loaded in your head and n is pretty rare to get the exact same problems that you have done even when you get the exact same problems there are twists on it so so then and you go to sites like spas there are there are 16,000 problems indeed come only as a thousand hectare in has a thousand and something something but that's 16,000 pounds in sports this is no when you see all the problems before it so only way to actually properly do this is to this bit some patterns in then and then putting it limit on your time that that's it and in calibrate to harder problems which is what we do in the course you can we recalibrate to slightly harder problems medium do a challenging ones if we do patterns as dominant and then who should do a point where you feel like this is sufficient this is what you could do is multi cutting flesh circle something that is expected to be highly experienced with alpha throws the test you yes my saying they don't like it explicitly test you unless you come from that background but but once in a random while in provable so you can now make it thread-safe right so many knock your statement like that we kill the interview for you so and and you have as a software engineer you need to know what thread safe code is that it's just like it should be matter of private I'm adding the programming language question what almost went into work is see most of the rules apply for also are see from the reporters but is really hard to use to see what is good strategy can I see yes you can I mean ask the recruiter just right there straight up ask the recruiter can I use your Python it's easy first samatha recruit will tell you right there and if the recruits are no you have to you see you don't waste your time right if you don't want to you see after that that is what they stay on your side array stay on your side is be more confident is it good to test with some examples of to finish coding shouldn't take twenty minutes even with testing yes this problem should take twenty minutes with testing with dialogue with coding with delivery this is a 20 minute problem as ikf actual financing for people not in the u.s. no no no we don't sorry appreciate that appreciate your interest but apologize have have seen list of test cases that we when that we write being asked how to be prepared sorry Monica you know I don't understand exactly what you mean please will be mind repeating the last question as well not let bill giving turn XML another thank Camille interviewing yes yes they're interviewing like it said Facebook was interviewing a forty four until married very recently he fight we are still hiring six seven eight they are hiring Google they are not able to fill photos even today forty five six seven and eight on it so like deal with this pandemic as if there is no pandemic your job search is going to be much better you are at home privileged all of us are at me to deal with it with the privilege of time and just apply you'll find something nice obviously there is a lot more to be said about it I am just being cautious of time folks it is 10:30 Wow because there are three more questions all right folks let's let this be the end of questions I appreciate all your time we will all send you send you link to link table let me just take the three last three that have come i joined later mist can I find the webinar recording later yes you will what test cases would you write for this good question Molly Garden good good question what right right right start with the main test cases and then go with a couple of edge cases don't take this stress of writing neck 20,000 test cases first the main ones should pass and then some edge cases should show us that's it that's that's the only idea don't overthink this good like 90% solution of this we should write a test case for our code also not always inner she not not always you don't have to always add test cases this is have to be written to get your own confidence how are you confident if you're not writing test cases right say it's not like because I wanted how are you confident ready how do you how do you turn around and even utter a single word when you when you don't write test pieces for yourself so so write test cases which are like okay here is the main one here are the two edge ones this is fine more than anything else you should understand what in what an invariant is when you understand what an invariant is is when you will get a much better handle on the solution and you will not need too many test cases this is a problem with just one loop single loop nothing else in so you need to look up loop invariant right look up loop invariant when you when you get a good understanding of loop invariant after solving a few problems like you will realize that you will need fewer test cases to justify your own solution okay all right folks Wow there are three more okay folks if you if you need any information I mean interview kick-start right just just sign up on our website and get it right or reach out to your program advisor if you've already tried once I'm not here to answer too many questions and interview you know a kickstart [Music] and there are some more questions and interview should you write discuss are mid-size starting to be same as flying yes sir wish yes everybody has a garden with such villa can it lose out to remote on-site interviews given the design require lot of no no my won't lose out there are ways to handle interviews remote it always are nothing new these guys have been doing it for a long time look up our blog post you know kickstart as a blog post it's an excellent blog at the best on the web that you'll find a very comprehensive on how to handle remote interviews right you will see list of tools you remind you for so many different things can you explain process more about how I can help us we do cover mock interviews we focus as you know in a click start is here to help we run courses to help you for technical interviews this is exactly what we do in the program we really orient you to what these interviews are and how can you succeed through this we have classes homework tests market is very structured program very structured flexibility in the program so you can do it part-time as well and and then we have scores that start every two weeks right so sometimes actually even more frequent than that if you're interested just please do reach out to reach out on the website and then we will be very happy to give you all the information you need for it if you have any single even small desire from this is Ryan can you hear me I can hear it yes time guys sorry Angie's going to jump in here so for those of you who want to know more or interview kick start right it's very simple there are two ways to find out one way is the most obvious which is just go to the website it's WWWE BM on there you can sign up for a webinar okay so how and I are on webinars multiple times where we explain the course in detail and you know in various options that you have I'm sure you'll find a time that suits you you know please feel free to go it's quite a useful session right to learn about what we do at integrated start the other way if you have something you very specific that you want to ask us about just send us an email at sta RT start at interview kick-start comm right and one of us will undoubtably reach out to you with a specific answer to your question but for the generic understanding of interview kick-start you can you can just you know sign up for the webinar I saw this you know somebody that asks a question saying do you cover mock interviews we have actually just launched it I'm not sure it's up live on the website as yet but yes we have just launched a mock interview only package but in general what we see is that it's much better to do mock interviews once you've done some preparation and in all our courses that we offer we have a significant number of mock interviews those mock interviews are actually conducted by actual hiring managers right folks who are currently hiring managers at Facebook Amazon Google a lot of tech leaves as well fundamentally everybody who does these interviews or they are people who are actively interviewing at the Facebook's and the Google's of the world you know Soham himself actually has done I know some possibly upwards of fifteen hundred interviews maybe close to 2,000 right and so yes right now so so you know for more information just log on to the website sign up for a webinar or send us an email at started interview kickstarter.com okay let's focus this session on asking questions to suam on what he's been talking about or a focus tank so i'm sorry i just wanted to jump in to clarify no I think they're done actually the timing was okay guys I just wanna you know thank so hum I want to thank all of you for making the time to be here today right this is something that we want to do on a regular basis we plan to do these sessions every couple of weeks we have a whole bunch of interesting sessions coming up the next session ironically is a session that I am doing which is on how to overcome interview anxiety if any of you face interview anxiety you know feel free to come and attend the session for any of you who have friends right who struggle with this problem it's quite common just feel free to send the link out to them as well okay alright folks keep keep in touch with us keep looking out for these sessions thank you very much so hum phenomenal session thanks guys thank you for all your questions and I look forward to seeing you guys at the up-and-coming events thank you everybody bye [Music]
Info
Channel: Interview Kickstart
Views: 6,096
Rating: 4.9047618 out of 5
Keywords: faang interview, faang companies interview, interview kickstart, interviewkickstart, technical interview, coding interview, interview prep, interview questions, facebook interview questions, apple interview questions, amazon interview questions, netflix interview questions, google interview questions, uplevel interview kickstart, tech interviews, coding interviews
Id: vhgJIQfL0Y0
Channel Id: undefined
Length: 87min 49sec (5269 seconds)
Published: Thu Jul 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.