Watch a technical mock interview with a Microsoft engineer
Admiral Lambda, a Microsoft engineer, interviewed Inventive Lizard in Python
Share
Summary

Problem type 

LRU cache

Question(s) asked 

1) Design an LRU cache. 2) Find the longest common prefix from an array of strings.

Feedback

Feedback about Inventive Lizard (the interviewee)

Advance this person to the next round?
  Yes
How were their technical skills?
3/4
How was their problem solving ability?
4/4
What about their communication ability?
4/4
Focus more on data structures, and their usage. We knoe the hashmaps, and linkedlists, and queues, but if you can nail what and how they are used, that will be awesome at your level. I found your problem solving ability to be really good, you took the use cases, and attacked the problem with the use-cases. A very important thing when solving software design problems. This to me also shows the knack of customer focus. Read through some of the basics of system design, like Services, APIs, rate limiting, and you will do well.

Feedback about Admiral Lambda (the interviewer)

Would you want to work with this person?
  No
How excited would you be to work with them?
N/A
How good were the questions?
2/4
How helpful was your interviewer in guiding you to the solution(s)?
3/4
The interviewer was very kind, patient and helpful while I was solving the questions. I think the LRU cache question was at the right difficulty level, but too frequent. I wished that I had gotten a question that I hadn't seen before. The second question was a little too easy, but good given the time that I had left. I think the interviewer could give the interviewee some more time to work through bugs on their own, but overall gave good hints and guidance. Good interview!
Transcript
Admiral Lambda: So this being a practice interview, you know, we'll still try and do it in the fashion that actual interviews happen. But I'll make it more casual so that if you need the hints or if you need more... feel more than happy to ask me questions. Just because it's a practice interview, you have more leeway. Yeah, let's start with introducing ourselves. I'll go first. And I'll give you a few minutes to let you talk about some of your recent work, any particular project that you would like to talk about, whatever interests you. And I think this is a coding style interview that you would like to do? Inventive Lizard: Coding style interview? Admiral Lambda: I mean, is this basic standard coding algorithm, data structures interview that you are practicing? Right? Inventive Lizard: Yes, absolutely. Admiral Lambda: Right. Okay. Great. So Peter, I have been in the industry for 14 years now and have worked across a few companies, working on services, APIs... used to do things in the front end before, now more of a back end guy, looked at distributed systems. And yeah, enjoy solving larger problems with more simplicity. So that's what I focus on now. Yeah. How about you? Inventive Lizard: Yes, so I'm a rising junior in college studying Computer Science. I took a gap year this year. So I'm going back to school in September, but over this past year, I worked as a front end intern over a physical security startup in California, and so, I sort of delved deep into front end development, and don't have much exposure to the back end or distributed systems or things like that. Although I do want to move into that field out of college. Admiral Lambda: Do you have a preferred language of choice that you would like to? Inventive Lizard: Yeah, is it Python okay? Admiral Lambda: Sure, I'm fine. I haven't coded much in Python, but I'm more than happy to understand what you write the code in. Inventive Lizard: Okay. Admiral Lambda: And, yeah, I'm still learning... any particular problem that you would like to solve or focus on areas of the problems like, specifically string problems, problems related to arrays, or data structures in particular? Inventive Lizard: Just whatever you think is okay. Admiral Lambda: Okay. All right. So have you heard of stocks buying and selling problem? Inventive Lizard: I have. Yes. Admiral Lambda: Okay. Then let's skip that. So you would have already practiced it. Let's go by... Do you understand what a LRU cache is? Inventive Lizard: Yes, I do. Admiral Lambda: Do you know how to code for it? Inventive Lizard: I can try. Admiral Lambda: Okay, so why don't you first tell me what's an LRU cache? I'll give you a minute. And then I'll actually put in what you need to do. So that you understand. Inventive Lizard: Okay, so I think a LRU cache is a least recently used cache. And so it's essentially a store of data that has a certain kind of capacity, and you're able to introduce elements and store it in that data structure. And if you look for the same value in that destruction, then it can be immediately returned. Whereas if the value is not in the in the cache, then you won't be able to find the value. Admiral Lambda: Right. What happens if the capacity is full? Inventive Lizard: Then the least recently used element is ejected, and the new element is inserted into the cache. Admiral Lambda: Okay, fantastic. I think you know the cache. Let's try and code for it. I'll put in the problem statement here. Inventive Lizard: It should be command slash. Admiral Lambda: Control slash. Yeah. Yeah. So what you need to do is it's basically a LRU cache. You need to implement using a data structure. And there are basically two methods that you have to implement, get and put. Get being if the key of the element is present, then you get me the value for it, and put is if the key is not present, you insert the record, and if it is already present, then you have to basically eject it, and then put it back again, so that it becomes the most recently used one. Okay. And I'll give you a few examples. For example... I had the problem in Java, but basically I'm a Java programmer who writes code in some other languages to like C or C++. So it's fine. So essentially what you need to do, so let's say if you have a cache, you put the first element: one, two. For the simplicity of this question, let's just take in that the key and values are the same. So if you say, put in a key of one, the value of push should be one. If the key is two, the value of that is two. So that's just a numeric values and keys. Okay. And at this point, if you have inserted one and two, if you retrieve the most recent one, you will get one over here on this line, and then you go ahead and put three, and then next time when you get output, get two, it should return you two and then make that as the most recently used. Okay. So, is the problem clear? Inventive Lizard: Yes, it is. Admiral Lambda: Okay. Great. Yeah, go ahead with however you want to start off with. And I'll also tell you that if we get across this problem faster, then we'll spend more time on another problem. Inventive Lizard: Okay. Great. So just to clarify, if the element is not in the cache, then when we try to get that element, and you should just return None?. Admiral Lambda: Yeah, return None, return minus one. Whatever feels good. I made it minus one just because we only deal with integers. Inventive Lizard: Okay. I see. Okay, yeah. So I think the general approach is you can have a hash table that points to a node. Oh, it's part of a linked list. Admiral Lambda: Okay. Inventive Lizard: And so that's what happens when we do object dot put (1, 1). Admiral Lambda: Okay. Inventive Lizard: So node one is a linked list, and you kind of put in two. First you check that the hash table is smaller than the max capacity. And I guess you put it behind this node one. I think it'd be better if we put it before node one. Admiral Lambda: Quick question, pardon my understanding of if this is very specific to Python, but why are you using hash table with the value being on linked list node. Inventive Lizard: So I think this would just store a reference to this pointer, or it'd be a pointer to this node. This one rather. Admiral Lambda: Let's say we are just dealing with integers and very basic, there are no objects. And we don't need to take care of the pointers or anything, it's a very simple numeric value. Inventive Lizard: Okay. Admiral Lambda: I mean, yeah. Yeah, that makes sense. So let's start from the beginning. So if we have one that we append, we add the one to the cache. And then we put two, but we're gonna have to somehow keep track of... you're gonna have to keep track of which one was least recently used. Inventive Lizard: What is the data structure in Python that does this? Admiral Lambda: A dictionary? Inventive Lizard: Yeah. Admiral Lambda: So one is the key. And this one is the value? Inventive Lizard: Sure. Admiral Lambda: I think we do need to like list to sort of, I'm thinking that we need a linked list to keep track of the order of how these were added to our dictionary. So first, it's one that's the most recent. Then we'll be adding... Inventive Lizard: In the order of insertion? Admiral Lambda: Oh, yes. Dictionary does... Inventive Lizard: So if it does maintain the order of insertion, then do you need any other data structure to keep track of order? Actually, I don't think that the Python dictionary keeps track of order. Admiral Lambda: Probably maybe... Yeah, that's a bit strange with Python is that they have... I don't know what version of Python is running right now. I can google it up... but I thought the latest one has it. Inventive Lizard: Let me just quickly try it then. Admiral Lambda: Sure. Sure. Inventive Lizard: Okay, we have the dictionary. Admiral Lambda: And if you need to Google up something. I'm okay with it. Yeah. And usually in the interviews also, people are usually okay. I mean, you can ask. Inventive Lizard: Okay. Yeah, it doesn't seem to store the order. It should have printed B and A first, but it printed A and B. Admiral Lambda: Can you try adding some more, so that I'm just saying if it maintains the reverse order? Inventive Lizard: Yeah, gets sorted by like alphabetically. Oh, interesting. Admiral Lambda: This is ACB. Okay, so there is no order. Okay. Okay, there. Inventive Lizard: Quickly. Can I switch you to Python3 and let's try this. Admiral Lambda: Sure. Inventive Lizard: And can you try running this one more time? Are you still there? Admiral Lambda: Oh, yes. Can you see what I'm doing? Inventive Lizard: Actually, no. Admiral Lambda: Oh, I'm sorry. Can you see this? Inventive Lizard: Yeah, you commented that out here. Okay. Okay, let's try this. Admiral Lambda: Okay, great. So there seems to be order. Okay. Awesome. Inventive Lizard: Yeah. Then if the dictionary maintains order, then I think we can put one and then put two. Which means... okay. If the two is added after the one... Okay, and then when we get one, we just simply remove it, then add it again. That was line 13. And then for line 14, we add it to the end. And then we try to get two. Then we put four. Oh, oops. Admiral Lambda: Yeah, that's right. Inventive Lizard: Right. So those that's one, two and then we got one, right? And then now we want to put three. So we simply delete the first entry and then add three, three. And then... Admiral Lambda: Yeah, if the capacity is two, yes. Inventive Lizard: Right. And then we try to get two, but it doesn't exist. So we can simply give them negative one. And then we put four, one is the least recently used. And then we get one, which is also negative one. Admiral Lambda: Right. Inventive Lizard: I think that's the general approach. Admiral Lambda: Right. Inventive Lizard: Is it okay if I begin to implement that? Admiral Lambda: Yes, please, go ahead with the implementation. Inventive Lizard: This should be a class, LRU. So this has an initializer and a put and a get. This is going to need a hash, just going to be a dictionary. This can have a given max capacity. Now, when you put the value, you want to do the length of self.cache is less than the self.max_capacity. And you're just free to append the key value to our cache. So you do self.cache at key value. Otherwise, you need to remove the first entry from our cache. So need to delete. Well, let's figure out what the first key is first. To figure out the first cache, you can do delete self cache at first key. And after deleting that first entry, you're free to add to that dictionary the key value. So if there's a successful put, should we just return true? Does it matter what we return after the put? Admiral Lambda: No, it doesn't matter what you return after the put. Yeah, let's just put or whatever. Inventive Lizard: For the get, you can simply do value is in the cache, you want to get the result. I want to get what that value actually is. This should be more appropriately named, just key. So we're going to return that result at the end. But before we do that, we have to delete self.cache at the key. Then add it again. Return result. If the key is not in self.cache, return at this point. So just to make sure that we're doing this correctly, just run through the example input again. So we create a new LRU cache with max capacity of two. And when we put in one, one, length of self.cache is zero, or, yeah, and zero is definitely less than two. So we can add in the one, one, we can also do that for two, two. At that point, we are going to have something like self.cache is going to be one, one and two, two and we try to get one. One is in the self.cache. So we get the value, delete that, and then add it again. Then we just return one. And then we put three. So we're at max capacity. So we get the first key, remove it, and then add three, three. And then we try to get a non existent two. So we just simply return negative one. And then we put four. And we return negative one when we try to get one. So I think this should work. Admiral Lambda: Is there a use case where this won't work? When can you see breaking your code for a use case? Inventive Lizard: So okay, let's go through this. It'd be function by function. For the put, for each, as long as the length of self.cache is less than the max capacity, we add it to our cache. Otherwise, we... So let's say at line number 12. I change this to say this. Yeah. So then we would enter this condition. This else. Admiral Lambda: Why? Inventive Lizard: Rather, we would enter this, because length is one so far. Admiral Lambda: Yeah. What would happen if you try and put the same key value again in the dictionary? Inventive Lizard: Right. Would it update the least... Would it update the most recently used? Admiral Lambda: So you said it will? Inventive Lizard: It would not update the most recently used. So to explain. If we had a one, one, and hypothetically, we had a three three in there, and we put in another one, one, then this should actually move this up to the front. But it doesn't do that right now. I think. Admiral Lambda: Yeah, that's correct. That's true. If you increase the capacity, you would have done that use case. But in this case, if the capacity is just two, and you don't have this, it's basically there is just one element in it. And your capacity is still less than the max capacity, and you will try that again. So it would it should actually eject this and inserted back in again, so that step of ejecting after line number 32, I believe it's missing. So what you explain is the same thing. Yeah, I'm talking in capacity of two. Inventive Lizard: Okay. Yeah. So, just to repeat what you said. You're sort of saying that if you try to enter this, like an existing key, and you should eject this and then add it again. Admiral Lambda: Right. Inventive Lizard: Okay, that makes sense. Yeah, I think in... my thinking is, if you already have the key, and this would just like updates the value to whatever you try to put in and it wouldn't increase the length of the cache. Right? Admiral Lambda: It would update the value and it will not change the length of the cache. Let's go by the example. Let's go by the example that you were talking about when you were breaking the use case, which is, let's say if the capacity is three, and let's go with if you had two here and two here. So you had one and one inserted. And after that, you will have two and two inserted. When you do line number 13, you would get the value of one, it will remove it and put it after on line 22. Now when you get three and three, you would insert that, right? Let's say I add one another line over here is, let's say we do this. And instead of three, three, I say, one, one. Inventive Lizard: I see. So you're saying this does not move to the front, like it should? Admiral Lambda: Correct, because you still have... when you're trying to put in one one, you have actually... Well, in this case you would do is it would remove the first element, because it is over the capacity. And then it is going to insert one, one. Inventive Lizard: Right, which is a problem. Admiral Lambda: Right. So now you have duplicates. Inventive Lizard: Yeah. So we need to add another conditional if key in self.cache... And then you can add it to the cache. Admiral Lambda: Right. And that is for the case when it is within the capacity. And if it is, let's see... if it hits the capacity. In that case, use still retrieve the first key and delete the first key and then put it back, which you will still have the duplicates. So what you're doing in the if condition should also be done in the else condition. Right? So let's go one time more. You have one and two. And at line number 13, you would retrieve one and finish with an end right? Right? So at line number 13 you would get one and put it back again in the top, which would mean interchange line 22 and 23. Right. Now on line 14, you would put three back three in, because you still have capacity. So you will put three. Right. Yeah, now come to line 15, you have to put one and one. Can you put one and one, because you still... now you have in the else condition, else block. So going by the code, you will retrieve and insert a duplicate. Inventive Lizard: So we would need to do if key in our cache, self.cache at key. So we would delete this one one and then also delete... Well actually, I think this would come after. So we would delete the least recently used. We would also delete one, one, and then we will put it at the front. Admiral Lambda: But why did you delete to two, two? So two, two is now missing. It used to be 1 1 2 2 3 3. Right. Three, three. Yeah. Ah, I see. Inventive Lizard: So what should have been output, the actual at the end of this step, your output should be 1 1 3 3 1. Well, it should be 2 2 3 3 1 1. Right? Admiral Lambda: Right, yeah. So, you should only delete the least recently used. Trying to put one, one back in. If it's already in there, then just delete it. And then do self.cache if key equals value, and then just return. So if the key is not in the cache, then delete the first one. And then add at the key at the value of that key. Inventive Lizard: So continue to go through the use case one more time with the code change that you made. So the beginnings of the cache is empty. We add one, one, we add two, two. And then we change these. And now we try to put in three, three. So can you put in one, one again, you see that the key is already in self.cache. So we have removed. Admiral Lambda: But you want go into the if condition, because you have already hitting a capacity of three. Now when you try to put one one, you won't come to line 45 because you have the cache is no more or less than the max capacity. Right? We change the max capacity over here to three. So if the max capacity is now three, you won't come here anymore, right? You will go into this block. Right? What is the capacity right now with the current state of the self cache? Inventive Lizard: It's three, so we'll go into this else. Admiral Lambda: Yes. Now when I try to put one, one, what happens? Inventive Lizard: We see that the key is in the self.cache, and we delete it. And then we add it back, I think, right? Yeah, I think this is a little bit messy. But maybe I wonder if there's a cleaner way to write this. Admiral Lambda: I'm sure, I think this does the job. But yeah, you can clean it up by if you reverse the condition if and else, if you always think that when you try to put a key and value in the dictionary, if you always try and check for its existence, and then delete, and add it back again, that takes care of the first thing. And then you can look at the capacity about. And then there are a few common code lines that can be taken out and separated. But yeah. Okay, good. Yeah, this should work. Great. All right, let's do one other problem. I'll give you. So given an input. I would like you to give me an output. You're given an array of strings and you have to give me the the largest common prefix among the strings in the array. Have you seen this problem before? Inventive Lizard: I have not. Admiral Lambda: Okay. Because this is one example. The other example will be this. In this there are three inputs, dog racecar, so there is nothing common prefix. So there is no common prefix. And in this, it's flower, flow, flight. The common is fl, even the flow is common between these two, but it's not common with this. So the common largest prefix is fl. Okay. Okay. Yeah. Any questions? Inventive Lizard: Are there always three inputs? Or can that be any number of inputs? Admiral Lambda: Any number of inputs, can be five can be ten. And what should we do if there's zero input? Just return an empty string maybe? Inventive Lizard: So if the input is let's say this, then yeah, just return... you can return a negative or a false or there is no, just an error statement. Admiral Lambda: Okay. Inventive Lizard: Yeah, or if input has anything like this, and then you have yak and carton, even then the output has to be empty, because there is nothing common, so this should give you this. You can return a false here. Or just an error message. Yeah. Yeah. But yeah, so you these are the edge cases that we can. Admiral Lambda: Okay. Sure. Let's see. So I'm thinking maybe we can iterate through each, we can iterate from zero to the length of the minimum string, the minimum length string, and also have a for loop that goes through each string. And if any of the characters are different from one another, then you can return. And once you have the largest sort of index, where everything is the same thing, you can take any of the strings and go from zero to say i. Inventive Lizard: So, you said you will start with reading from zero to the minimum. What is the first thing that you would do... zero to minimum length string, how would you know the minimum length string. So we can go... We can do a simple pass through each word. Admiral Lambda: Meaning each string in the array. Okay. Okay. Inventive Lizard: And so after we found that minimum length, we can go from i to that length. Admiral Lambda: Once you find the minimum length string, you would then...? Inventive Lizard: Oh, sorry, not the minimum length string, but rather the minimum length. Admiral Lambda: Okay, so let's say in the first example, the minimum length is four, right? So you will go from zero to four, right? Inventive Lizard: And within that iteration, we do a inner for loop, and we go through each word, each string of the array. And we check that each character is the same. If they're not the same, then we can break out. Admiral Lambda: I see. So if you're saying that in the first example, that's four, so you for the IE being four, you would check for the character of the first string, compare it with the second string, third string and so on, for how many other strings there are in the array. Right? Inventive Lizard: Right. Exactly. Okay. So what if, in that case, this is a three string array? What if the input has... if this has everything matching in it, but somewhere 1001th string is actually empty? What would you do then? Admiral Lambda: So since we know that the minimum length is zero, it would actually make no passes. And at the end, we can return zero because the only case that that wouldn't break is the... Inventive Lizard: Okay. Yeah. Okay. Yeah, I think that sounds right. That sounds right. Admiral Lambda: Do you know how the complexity of this solution would be? Inventive Lizard: Yeah, so I think it would be O(nm), where n is the length of the shortest string, and m would be the number of strings into the array. Admiral Lambda: Okay. And then you also have endless n m, okay... Because you will loop through the array on the first pass to find the minimum length of the string, okay. Sure. All right. Let's see, what would I want to do? Can you just code me the function where, let's say you have the smallest string and you would like to find out the largest prefix, so just code me that function. Inventive Lizard: Okay. Yeah. So, assume that we already have the smallest length. Yeah. Find our interest prefix. Something like that. Admiral Lambda: Yeah. Inventive Lizard: Okay. Also want to do for string in words. So we want all of the strings at index i to be say words at zero. Right. Admiral Lambda: Okay. Inventive Lizard: And so I think in Python the i actually remains the element inside, the index inside here. I think we can just simply do read at zero, from zero to i. Let's see, if we quickly just test it. We had flower flow flight. Just take this one out, because I don't think that will matter that much. So we go from zero to four. So, char is f. For stringing words, its string is equal to f and break. So we're at index one when we do l at index two when we do o, index three, we look at f at w. And so since all the words are valid, I will stop at three, index three I believe. And so we want to take the words, the first word from zero to three plus one, because this is exclusive. I think zero one. Admiral Lambda: Now, just add the word flight back in again. And so... So now you have iterated over flower and flow. But when you come to the word flight, your index has to stop at f and l. So how do you stop that? Inventive Lizard: Yeah, so we would first do i equals zero. So everything is fine. I grade one, everything is fine. And then i, that's two. See if we go from zero to three on flower. Admiral Lambda: So i is equal to two right now. Inventive Lizard: And so we would return flo which is incorrect. So maybe it should be i... I'm not sure if we knew flour and flow. I'm not sure if I reaches four at the end. But... Admiral Lambda: If it increments it. So if i starts from zero, it doesn't matter. I mean, you can test it out. So it doesn't matter. If i starts from zero, we'll just have to check it in Python. If it starts from zero, then you do a length minus one. And if it starts from one just then just take the value of i whatever the index is. So, yeah. Is there something in Python which would say given a string, given two strings... is there a string library that will tell you if a string is a prefix or suffix of a particular string? Inventive Lizard: I don't think so. Admiral Lambda: Even I don't know. So I was just asking. So if you... Oh, yeah? Inventive Lizard: It doesn't guarantee that it's a prefix. Admiral Lambda: I think yeah. So if you think something in these lines that might run things a bit faster is, let's say you have the smallest length word. And if you take in the smallest length word, and start putting it against the rest of the words, and see if the smallest length word is a prefix of the other word, if not, then decrement the smallest word by one character, and then check for the prefix or decrement it one more time check for the prefix. So that way, you always will have the smallest common prefix to start off with. By that, I mean is. So between these two, flo will always be the smallest prefix. But if you go with these three, fl becomes the smallest prefix. Let's say you go with these four, f becomes the smallest prefix. So that way, if you have something over here already empty, you would, it would just return you that there is no more smaller prefix. Right, so just another thought, but what you're doing is also one way to do it. You can look at it in another way as well. Okay, I think we are almost at the end of the interview with three, four minutes remaining. Yeah, I would let you ask any questions you have. Inventive Lizard: Yeah, so this is not so much about the interview, but throughout career progression in general, is that okay? Admiral Lambda: Sure. Inventive Lizard: So how did you begin learning distributed systems? Is it... Like, did you read books or go to college for it? Admiral Lambda: Actually, so I think it, there wasn't much of distributed systems, when I actually started off, it was more of jumping into the work and then handling issues. And then slowly with some experience, you start diving into, you start from a smaller module, and then you get into biggest components. And then you start saying that, okay, fine, I think I can understand how this whole system works. So it is starting from a smaller given problem to a bit of ambiguity in a smaller module, then to some more ambiguity in a bigger system that you have no idea on how this is even going to work. So it's a step one, step by step process, where, yeah, you being you being fresh out of college, you will still go through the steps where someone senior will tell you that you need to do the coding for this, this, this. So you basically do the coding steps, and then learn a little bit about the systems. And then eventually, we get more confidence in you. And then we would say, okay, fine, you go ahead and talk to such and such team, and figure out what needs to be done. So that's when you get into the bigger systems and how these systems work. Inventive Lizard: Do you have any just career advice for new graduates? Some advice? Admiral Lambda: I would say I think you are pretty much on the right track by understanding... some of the some of the folks actually do struggle a lot with the LRU cache problem. And it's just that it's just that a lot of times people don't get into the coding specifics of things. So there are quite intermediate level people who struggle with these problems also. I would say, learn about how some of the system designs work. I think there are a few good books out there, for example would be... I mean, it wouldn't be at your level, but if someone has to ask you that, how would you design Uber as of today? What are the various things you can think of? So when I'm asking you that question, I know you cannot design Uber in 45 minutes. And whatever solution you give them is neither right nor wrong. What I'm looking at is how you think, what are the use cases you can think of? What are the different systems you're talking about? Right? If I have to tell you can you design a chat, chat bot for me chat messengers chatting room? Or let's say that an online word documenting thing like the Google Doc? What are the things that you can think of? Those are the areas that I'm looking for right now, when you when I'm talking to a junior or an intermediate person. And then I would ask you, maybe if I'm very specific, I can say, what are some of the numbers that you can think of? How much is the capacity that we can hit on this? How would you store? How would you design the database for this? So if you can only think of these, some of these questions, there are a few, I would say, I think there are YouTube videos and a couple of questions. Even the LRU cache is a pretty common thing in a lot of design thing. This was a very basic, you can scale up the caching problem. And think in terms of that. So and the second problem that we did around strings, for that matter, think of it as it's text search. Let's say I give you a dictionary of a lexicography. Right, I give you a bigger dictionary, and then I asked you to find out the prefix, the common prefix in the first hundred pages of the dictionary. So if it's a real world problem, how would you scale that? How would you create a service or API's things like that. Inventive Lizard: Is studying system design actually useful for something other than interviews? Is it actually used on the job? Admiral Lambda: It is used on the job. Inventive Lizard: Okay. Admiral Lambda: Yeah, it is. It is used on the job. So the cache LRU cache is used on the job, the string search? Yes, every project may not need it. But system designs are the ones that are actually used on the job. I'll give you one more example is, if you do Google, when you do a Google search, you will see it starts... It starts giving you hints if you start typing in the latest version of Python, so when you start typing in the latest version of, Google tries and interprets what would be your next word. So it gives you options. The latest version of C++, C sharp, Java, Python, how does it do that? What is it that it? How does that system work is something you can think of. It comes from a data structure. There is a data structure behind it, but what is that data structure? And how do you manage that data structure are some of the things. Inventive Lizard: I see. Admiral Lambda: Yeah, so yeah, it's a fascinating world. All right. Any other questions? Inventive Lizard: No, that's about it. Thank you so much. Admiral Lambda: All right. Yeah, have a wonderful rest of the day and a nice weekend. Bye bye. Inventive Lizard: Bye.
Want to get some practice yourself?
Become awesome at interviewing, and get actionable feedback from engineers at top companies – it’s 100% anonymous!
©2020 Interviewing.io Inc. Made with <3 in San Francisco.