We helped write the sequel to "Cracking the Coding Interview". Read 9 chapters for free

Java Interview with a FAANG engineer

Watch someone solve the find the minimum and maximum number of nodes between critical points problem in an interview with a FAANG engineer and see the feedback their interviewer left them. Explore this problem and others in our library of interview replays.

Interview Summary

Problem type

Find the Minimum and Maximum Number of Nodes Between Critical Points

Interview question

1) A critical point in a linked list is defined as either a local maxima or a local minima. A node is a local maxima if the current node has a value strictly greater than the previous node and the next node. A node is a local minima if the current node has a value strictly smaller than the previous node and the next node. Note that a node can only be a local maxima/minima if there exists both a previous node and a next node. Given a linked list head, return an array of length 2 containing [minDistance, maxDistance] where minDistance is the minimum distance between any two distinct critical points and maxDistance is the maximum distance between any two distinct critical points. If there are fewer than two critical points, return [-1, -1]. 2) Given an array of integers arr, return true if and only if it is a valid mountain array. arr is a mountain array if and only if: * arr.length >= 3 * There exists some i with 0 < i < arr.length - 1 such that: * arr[0] < arr[1] < ... < arr[i - 1] < arr[i] * arr[i] > arr[i + 1] > ... > arr[arr.length - 1]

Interview Feedback

Feedback about Jocular Almond (the interviewee)

Advance this person to the next round?
Thumbs upYes
How were their technical skills?
4/4
How was their problem solving ability?
4/4
What about their communication ability?
4/4
Overall: TC is really good in terms of clarifying the questions and articulating their solution. Their communication skills and speed of implementation is good. TC was able to get the optimal solution for both problem in first go. TC proactively shared the time and space complexity of their solutions. It would be strong hire call based on this interview performance. Notes: + TC clarified first problem by making sure they understand the defination of critical point. + TC clarified expected behaviour in case of less than two critical points. + TC validated their assumption that can link list be null/empty. + TC shared the optimal solution in no time for the first problem. + TC wrote down the algorithm for solving the first problem in brief. + TC wrote the code with ease. + TC wrote the modular code for first problem, defining separate method of checking if node is a critical point. + TC took care of edge cases in first problem implementation. + TC dry run their solution against test-case. + TC clarified the if mountain array needs to be strictly increasing and decreasing. + TC shared the solution based on their observation that mountain array is increasing from left and increasing from right and these increasing sequences end at same index. + TC wrote code for their approach. + TC identified the bug in their implementation and corrected the bug. + TC was able to come up with the good set of test-cases for second problem.

Feedback about Red Maelstrom (the interviewer)

Would you want to work with this person?
Thumbs upYes
How excited would you be to work with them?
4/4
How good were the questions?
4/4
How helpful was your interviewer in guiding you to the solution(s)?
4/4
Very grateful for the feedback on the interview and the guidance at the end.

Interview Transcript

Red Maelstrom: So, yeah, so basically we'll spend like 45 minutes on coding problems and I'll keep like last 10-15 minutes for feedback.
Jocular Almond: Sure.
Red Maelstrom: So, yeah, here is the first question.
Jocular Almond: You it?
Red Maelstrom: Yeah. So basically you have a link list as an input, head of a link list as an input, and there are a few definitions. Like a critical point is any node in a link list which is either local minima or local maxima. Local minima is a node which is strictly lesser than its previous and an x node. And local maxima is a node which is strictly greater than its previous and an x node. So given a such link list, you have to return two things. One is like minimum distance between any two critical points and maximum distance between any two critical points. Go through the question and the example. If you have any doubt, let me know.
Jocular Almond: Sure. Okay, so the problem is that we want to return the min distance and also the max distance between any two critical points. And so if we just had a look at this example here, a local maximize, this would be a local minima, two, three. This would be a local max, and then this would be local min. Is there any other ones? Seems like that's the only ones. So do we know, is there guaranteed to be any local mins or local maximums?
Red Maelstrom: No. It is also possible that there is no or less than two critical points.
Jocular Almond: Yes, no critical points. Also, this is where link list. Link list. And is there any limits on the size of the link list?
Red Maelstrom: You can assume that it fairly fits in memory. Ten to the power, five should be enough.
Jocular Almond: Okay. Ten to the power of five, n will be ten to the fifth. Ten to the five. Cool. And we're given. Yes. So I'm just thinking in terms of solutions. We can do this in a single pass, because if you notice, with a lot of these local mins, the min distance is always going to be between consecutive. So min distance will be between a consecutive critical point and then max distance will be between the last and the first critical point. So we can do this in basically o and time and pretty much, I think, o one space. So essentially we pass through, we look for the first critical point, and then we keep the position of that point, and then we keep the position of the previous and store that as the min. And then we go all the way to the max. Is my understanding correct here?
Red Maelstrom: Yes.
Jocular Almond: Okay. Would you like me to code that one up? Sure. So I'm going to be using Java. So I'm just going to write, assume we're going to return an integer array with those two outputs and then going to write the function signature, which is call it distances. And then int, we're going to be given, sorry, I'm going to assume that we're given a public class list node, and list node has, I'm assuming it's a singly linked list. It's just going to be one way. So it's going to be list node next and then int val, is the input possible to have an empty list?
Red Maelstrom: Yes.
Jocular Almond: Okay, so in that case I'm going to assume that the empty list is going to be represented by null. So we will have to handle that list node and just go ahead. And so we are going to be given, so I'm just going to write a few initial test cases what null is going to return also this would be good to try as well. And then also just maybe just have a single element what we return. In that case, let me just focus on the max distance for now. And then we can return, think about the min distance later. So with the max distance we want to take a look at, we want to loop through. So we want to have the prev value set to something, I don't know what yet, but then, yes, so we just, while loop through, while head is not equal to null, we set, the prev value is just going to be set to head. Actually what we can do is set this to a class integer. So then we can say is if it's null, then we don't worry about it. So if prev value is not equal to null, then we can do some stuff. And so after this, actually we're going to create a list node, current is equal to head and so we can traverse using head, using current, sorry. And current will be current next. And then if prev value is not equal to null, then we can check if prev value is less than head, sorry, less than current Val. And we can check if current next is not equal to null and current next is current next. Val is greater than sorry. Yes, greater than current Val. Then we know it's a local maxima. So it's a local maxima. So we can set the integer. And we also need to extract the positions. So we also have position is equal to zero and then increment positions. Position, increment the positions. And then we also want the position of the left most critical set that as an integer. And so if this, we also want to check if it's a local maxima. I think what we could create a helper function that checks. In this case, if it's a local maxima, we can do that. Actually we'll do that. So we'll do private boolean is critical point and we need to pass in the prep value. And we also pass in the list node current. And so I will implement that later. Is critical point prev value. Then we would set leftmost critical equal to, equal to current val position. Sorry, position. And then also we also want the integer right most critical. And we would always just set right most critical is equal to only if, yeah, we'd actually set right most critical here and it cool. Position. Okay, sorry. This would only be set if leftmost critical is not equal to null. Then we would set this in there. And so we know that now the min distance, so we can return new int min is going to be right most critical, minus left most critical. So those are the positions. And I'm going to assume that the distances, yeah, if it's like two, we'd have to plus one because it's the positions. And if it's like, in this case, if we have a look at this example up here, this would be 012-3456 the first critical point is at two, and then the last critical point is at five. And so the total distance between, is it four or is it two? Let me just double check. There are two critical points. The second node is a local maxima because this is second node. So two five. And so the distance is going to be two minus five. Okay, so we don't, plus one. Okay, so does that look okay in terms of, for the minimum distance? Hello?
Red Maelstrom: Yeah, I'm just looking at the code. Okay. Yeah, I think at least for happy case it does look okay.
Jocular Almond: Oh, sorry, I forgot current. Okay, so I'm going to now do the, now we want the integer, we want the previous critical point. And so now we'll just make a comment here. So calculate the min and max distances. So the max distances, this is for that, and then this is for calculate the minimum. Actually, I realized that the max distance is after, so this is actually, we'll add like a to do here, but then there's one more here. So now that we calculate the minimums, if Prev critical, sorry, no, if it's not equal to null, then we can do a calculation. And so we would do int min for now. And then we maybe set that to integer max value. And then if we can add to the same thing here. So if min is, let's say prev critical point minus current position, the current position is less than min. Then we can just set min is equal to minus position. And then otherwise we say prev critical point is now equal to the position. And then we just return the min here. Cool. So does that make sense?
Red Maelstrom: Yeah, I think this is good. Let's write a code for is critical point.
Jocular Almond: Sure. So we know Prev value is not going to be null and current. We first need to check if current next is equal to null, then we already know it's not going to be a critical point. So that's an easy one to just tick off. Then we want to check integer, then we can say integer next is equal to current next valve. And then we could say if. So we'll do local maximum. If Prev value is less than current Val and current Val is greater than next, then we can return true. And then we also local minima. I'm going to assume that if current dot Val is equal to next, then that doesn't count as a local maxima, right? Yeah, that's good. So now we can check if it's a local minima is if the current val is less than prev value and current val is less than next, then we can return true. Otherwise we can return false. And that would be that. Would you like me to run through an example?
Red Maelstrom: Yeah.
Jocular Almond: Sure. So if we just have a look at this. So we're going to track position and also we want to track, let's just track position for now. Zero. And we want to track, let's say prev value is that null at the start. And so at the start prev is null. So we don't do anything. Then we set preval value to should be current Val. That's what it should do. So now it should be five. And then we increment position to one and then move current next to three. Then current prev value is not equal to now. And so we check if it's a critical point. In this case, five is greater than current valve, but next is not greater than current valve. So we don't do anything. And then we increment preval to three, position to two, and then current valve up to one. And so now one, the value previously is less than prev value and the next value is greater than, sorry, less, greater than current value. So now we have a local maximite. It's a critical point. And so in this case we set left most critical to the position, and then right most critical also to the position. So let me write, most critical is two and then left. Most critical is now two. And we also. Prev critical point is not initialized, but now it is. So Prev critical point is now two. So after that we just move on. Two, sorry. Position moves to three. Prev value is one. Two is not a critical point. So I'm just going to move on. Five is going to be a local maxima. Yes, that should now positions. I forgot to increment position. Actually that's not correct. It shouldn't be three, it should be 01234. Should be four. So now it is a critical point. So we don't set the left most critical. Now we set right most critical to four. Then we now have a minimum. So Prev critical point minus position, which is four, minus two is two. So now we have min is two. And then, and then Prev critical point, we put that to four. Then we would increment that again to now position is five. Prev value is five. And then at this point, this is also critical point. It's a local minima. And so we set the rightmost critical to five. Prev critical point to the position. Sorry. We set the min, which is four minus five. That's less than the min because it's one. And so we set min to one. So the answer is going to be one, one, and then right most critical, minus left most critical, which is three, which I think is the answer. Yes. One, three. Also, what should I do if we don't find a minimum, what should I return?
Red Maelstrom: So if you don't find, like you should write a minus one, minus one. If there are less than two critical points.
Jocular Almond: Yes. Okay. So if we don't find a minimum, then we should actually return a maximum. So if integer min is equal to integer max value, we should set min is equal to, is equal to negative one. So that will return a negative one here and then with right most critical. I think if right most critical is equal to null, then we want to set, let's say int max is equal to, we want to set integer here. Or we can set Max equal to negative one. And this is only if we find, if we, if there's one critical point, does that mean that the distance from the max distance is going to be zero?
Red Maelstrom: No, it should be minus one, minus one. If it's less than two critical points, it should be minus one. Minus one.
Jocular Almond: Yeah. Okay. So we have to also check if leftmost critical is not equal to right most critical, critical, then Max is going to equal right most critical, minus left. Most critical. Otherwise it's going to be minus one. Minus one. And so that is going to be minus one. Sorry, Max. Okay. Yeah, I think that's it.
Red Maelstrom: Cool. I think. Yeah, this should work. Yeah. Let me just get a second question for you.
Jocular Almond: Sure.
Red Maelstrom: Yeah, but I really like the way how you wrote a modular code with a different method for condition for checking critical points.
Jocular Almond: Yeah, sure.
Red Maelstrom: This is the second question I tested at the top. So you have an array of integer and you have to return. True. If it is a valid mountain array. And the definition of a mountain array is like this, it has at least three elements and there exists an index I such that elements are strictly increasing till that I and elements are strictly decreasing after that. So both increasing and decreasing parts should be non empty.
Jocular Almond: Sure.
Red Maelstrom: So if you look at example number one, it has less than three elements so it's not a mountain array. Example number two, it's increasing but then it's not decreasing. The decreasing part is not there and there is this repetitive element. So it's not a mountain array whereas in example number three it's increasing from zero to three and from three onwards it's decreasing at the end, till the end. So it's a valid mountain array.
Jocular Almond: Okay, so I'm going to assume we're going to be Boolean return and it's only if it's a mountain array. And so I'm assuming that there's going to be some peak in here and then there's going to be essentially a ramp up and then a ramp down essentially. Is my understanding correct?
Red Maelstrom: Yeah, that's the right way to describe it.
Jocular Almond: Okay. And we're going to assume that. Can I assume all the elements are going to be valid integers? All the elements are to be like valid integers.
Red Maelstrom: Valid integers? Yeah, they could be positive or negative, but yeah, they are integer.
Jocular Almond: All inputs are valid integers. I'm also going to assume that all integers can be in the full range. So two to the 31, all the way to two to the 31, minus one. And I'm also going to assume that all the integers will be able to fit in memory like the whole array. It's not going to be too long. That's going to be an issue.
Red Maelstrom: Yeah, that's a valid point.
Jocular Almond: Okay. So I'm kind of thinking is that if we basically, I feel like we can do this in two passes is if essentially we check first to check how the first point to which it stops increasing and then second point from the end, from the end inwards to which it stops increasing and then if these two points match up, then we have a mountain array. If not, then we return false. Is my understanding. Correct there we robot just create an anti example.
Red Maelstrom: Yeah, I think this is a right approach.
Jocular Almond: Yes. Okay, it two and then one. But let's say we add a few more numbers like negative one and negative 20 and negative five. Okay. So I'm just going to assume some tests so we know that. Also I see that array length is going to be greater than three. So we know that there's at least three elements in there. So we're going to think this is going to be a good one. And then it must be strictly increasing. So that's also part of it as well. So that was a good test case. Maybe this one would be a good one as well. Two and then negative ten. So when I do public boolean is mountain array, I'm going to assume we're going to give in an integer array and then we want to look at whether. So we want to start from int I is equal to zero and then I less than. Let's grab n. Int n is equal to array length I is less than n and then we add, then we check array I. Well, we want to just loop through until we find the last element. We just like first peak. You can kind of think about it. And so you want to check if array I is less than array I plus one. And we need to minus one to n minus one just so we don't get an index out of bounds. And if this is true, then we can say first peak is equal to I plus one. And we keep doing that until that isn't the case. If it's either equal or equal or less than, then we just break. And then we know that's the first peak. And then we can say int peak from end is equal to, let's say n minus one. Then we for loop through int I is equal to n minus one, I is greater than equal to zero and then I minus minus. We want to check if array I. Sorry, this is not less than equal to one. It's be less than equal to not zero but one. And then if array is less than array I minus one, then we know that there's going to be a peak from end. Peak from end. It's going to be array I minus one. Okay. And then we check. If first peak is equal to peak from end, then we also need to break. Sorry. So it must be the first one from the end. And then if peak is, we just return. True. Actually, we can probably just return this now just return this Boolean, and that would get us that. I do want to just make sure, like, if we have something like five. Five.
Red Maelstrom: Wait.
Jocular Almond: In this case, the first peak is going to be set at zero and this is going to be set at two, and then this won't be that. But then also if we have something like this, the peak is actually going to be set to two. Right. So this is a bug. So I suppose what we can do is set this to n and set this to negative one so that if it's not increasing, then it won't ever. Then we know that it's not possible. So in this case.
Red Maelstrom: Okay, but then you need to handle it within the for loop also, right. Somehow.
Jocular Almond: So as in.
Red Maelstrom: Okay, no, your pick from is not dependent on its previous value. It's dependent on the value of I. So, yeah, I think. But should it be I plus one or should it be I only.
Jocular Almond: Because I'm thinking if this was like a mountain array, then.
Red Maelstrom: Right.
Jocular Almond: We check I is equal to zero, and then technically five is considered the peak. So we would set it to I plus one because we check if I plus one is greater than I. And so the first peak will be set to this. So FP is going to be set to that. And then peak from end is going to be set to I minus one. That's when it would overlap.
Red Maelstrom: Okay.
Jocular Almond: Would you like me to run through an example? Yeah, sure. In this case, we have 012-3456. And so we would start with first peak. FP is negative one. Actually slide it out, negative one. And then peak from end is equal to seven. And then we would loop through I. Is this element less than? Yes. So this gets set to one. Then we would go through here. This would get set to two, move through here. This would get set to three and then up to here. And then at this point we would break, and then we would loop from the end. And then check. Is this element less than I? Yes, it is. So we set this to five, then this is less than. Yes. Then put this to four, then to check four. So we check four minus three. So four minus one is three. And then we check that's three. And then we would go to here. And then this is the first element that doesn't follow that constraint. And so we would return. This equals that. And so that would return true. If, let's say we had a situation where we had like three, three. I think in this case this is invalid Mountain. And so we would get to this stage. And then first peak is going to still be three but peak from end is going to be four because we get here, that gets set, but then we go here and we don't do anything. So in this case it's false, which is correct. And so if there's any other elements in between here as well, that will catch that as well. I think that's it.
Red Maelstrom: Okay, cool. Yeah. What are the different test cases that comes to your mind? You don't need to run them.
Jocular Almond: Sure.
Red Maelstrom: But what you should think about.
Jocular Almond: So some test cases, definitely int, min, int, max are good ones. Also want to test with a high number of array elements. So like all the way to ten to the five we discussed would be good to have a high number of elements and all, let's say all increasing and then all decreasing and then a valid mountain, let's say in the middle. Some good, other cases would be also is if it was a mountain that was peak, was one from the left, from the left, mountain peak one from the right, mountain Peak. Like bias to the left and also bias to the right is also good ones. And.
Red Maelstrom: Yeah, I think these are the set of test cases. Cool. Yeah, I think these were the only two questions I was planning to ask and you completed it before four or five minutes. So yeah, let's pause for feedback. I think in both of the questions I really like the way you approach them. You did not rush through the solution. You make sure that you understood the problem statement. You asked the right clarification questions. For example, in the first question you did ask what should be the case if there are no critical points? What should be the case when there is just one critical point? I think that is very good thing about. That is very good thing you did in both of these problems. Also in second problems you did clarify about with few examples like is it a more valid mountain area or is it not a valid mountain area? You made sure that you understood the problem and then only you thought about solution. And when it came to solutioning part, I think not only your solutions were optimal in terms of time and space, but I also like the way you describe them. So you articulated your solutions in more easy to understand way. Spot on. On communication. I think during coding also you made sure that you are communicating what you are trying to do. It was easy for me to follow what you are trying to do because you were talking while you are writing code. Like I'm trying to do this, this is the reason I'm doing this. So it made the interview more interactive. So thanks for doing that. And I also like the way without interviewer asking you to analyze the complexity, you analyze both time and a space complexity, which shows a maturity. Like you do care about not only solving problem, but you do also care about efficiency of your solution that not only came through complexity discussion, but the way you made sure that your code is modular, your variable naming conventions are good. That also shows that you do respect for quality, which is a good thing at intermediate level engineering engineer, you're just not writing code for sake of it, or solving problem for sake of it. You do care about efficiency and quality. So, yeah, I think overall it would have been a strong higher call for any SD two kind of a level for fang like companies.
Jocular Almond: Would you consider, because I'm not too familiar with the levels because I know Amazon has a four and a three level. Would you say that that would be okay for a level four?
Red Maelstrom: Amazon SD like software engineering level starts from level four. So the university graduates will be hired at level four. But yeah, based on this interview, I'm also okay to hire you at level five, which is which I have two plus years of experience.
Jocular Almond: Yes. Okay, cool. And would that also apply for like, Facebook l four, I think Facebook e four and then Google?
Red Maelstrom: Google, I'm not sure because question level. I also taken interviews at Google. I wouldn't ask these kind of questions if I'm hiring for Google. I would ask little difficult. But yeah, for Facebook I can say that this is the question level, at least for coding, because they focus mostly on speed and accuracy, not on a difficult. So I'm sure about Facebook and Amazon. But yeah, with this interview, I cannot confidently say about Google.
Jocular Almond: Yeah. Okay. Because I've heard Google tends to ask questions where you're supposed to kind of get stuck in.
Red Maelstrom: Google. You can expect just one problem in 45 minutes. That is also okay there.
Jocular Almond: Okay, cool. I had actually one question.
Red Maelstrom: Sure.
Jocular Almond: It was around. Let me just take a look. If I actually get a question I've already solved, actually, would you recommend me to mention it to the interviewer? Because with these two questions, I think I've seen it somewhere. I haven't solved them, but I think if I did get a question I have solved, I would probably mention it.
Red Maelstrom: Personally, I do think you should tell interviewer that you have seen exactly. If it's the exactly same question.
Jocular Almond: Yeah.
Red Maelstrom: But I have seen friends of mine who have been not neither accept or deny it. They just say that, okay, this is a solution. What do you think? Is it right or wrong?
Jocular Almond: Yeah. Right. And they've passed the interview with that.
Red Maelstrom: Yeah. I don't think they are doing anything wrong because they are doing wrong, morally wrong. When they have been explicitly asked that, have you seen this question? And they deny it. Yeah, that is morally wrong. But if nobody's asking you, have you seen this question and you didn't do anything, I think it's not wrong. But, yeah, I personally don't do that. I usually do tell that I have seen this question.
Jocular Almond: Okay, cool. And then I have just a question that's not really related to interviewing because. Because I'm currently in Australia and I know there's some jobs. I'm not too sure how familiar you are with jobs in Australia, but would you recommend me moving to another country that's a bit more software? Has a lot more software jobs? Or would you say where I am is fine?
Red Maelstrom: This is my story. I am basically from India. I have worked in London also because of the same reason as you're thinking about. I was also having this fear of missing out, that I'm not working on cutting edge things like that. Right.
Jocular Almond: Yeah.
Red Maelstrom: And I was in London for a couple of years. I don't find a lot of difference, at least in terms of quality of work as compared to what I was doing in India and I was doing in. Also, like on a personal front, I did miss out on some significant events in my family because I was there. So I'm not proud of particularly of that decision. So, yeah, that is my personal experience. But I have seen friends who have moved to states who have moved to United States, and they are pretty happy about not only the quality of work, but they are also happy about the job opportunity or the number of recruiters reach out to them as compared to their home country.
Jocular Almond: Yes, because that's what I was thinking. Like, should I move to the states or something? That would be possible. But I do know there's some weird stuff around. If I move to the states, I think I still have to pay australian tax, which might be, oh, there is.
Red Maelstrom: No tax treaty between United States and Australia.
Jocular Almond: Yeah, I think there is some sort of tax treaty, but I think it's not as if you can completely get away from paying tax at all. I think there's some.
Red Maelstrom: Yeah, I think the tax treaty is like. Like you have to pay the maximum tax, whatever. So basically, if you are, let's say, in Seattle and the overall federal and the state tax comes out to be 33% of your salary. But I know, like, Australia charges 40% of your salary, so you have to pay the difference between 40 and 33. That is the 7% of income, you have to still pay in Australia.
Jocular Almond: Okay. But I still don't have to pay extra on top. It's not like 30%, 33% on top. If I did, I don't know if I would be able to survive.
Red Maelstrom: Yeah, that is my understanding. But, yeah, you can always cross check with things.
Jocular Almond: Yeah. Okay. I might have to do that, but if that's the case, I think that'd be pretty worth.
Red Maelstrom: Yeah. And I do have an idea about salaries in Australia, taxes in Australia, and, uh, expenses in Australia, and similar things in us. I do feel like you would. I do know for sure that you will definitely save more in states as compared to you would save in similar job in Australia. So not only about the opportunity wise, but at least on the paper, also financially, by doing the same thing, you would be doing better by doing the same in the same company, you would be doing better in states.
Jocular Almond: Right. Is that because of the high incomes in the states?
Red Maelstrom: I think, yeah, I know the salaries of us. And I had an Amazon Australia offer, so I did some digging around taxes in Australia and cost of living in Australia. I do feel like there would be a significant difference between saving in absolute number you would save in Australia compared to absolute number, you would save in states.
Jocular Almond: And then if you had to recommend cities in the states that you would want to move to, what would you say?
Red Maelstrom: It depends on what are you looking out for? If you are looking out for a good. It depends on what stage of life you are. Are you a bachelor? Are you with a family?
Jocular Almond: I'm pretty much single and pretty happy to just fully grind it out and live wherever and whatnot. So that's probably where I'm at.
Red Maelstrom: Okay, so if you move to states, you would be moving alone, right? Not with a partner or family. If you are in that stage of life where dating is important to you, I would recommend New York is a good city because you will get a lot of different kind of options in terms of dating. It's more cosmopolitan and also it's more mixed in terms of kind of job people do in New York, people from fashion, there will be people from editing, there would be people from finances, there would be people from tech. Whereas in California or Seattle, you would mostly find people from tech. So, basically, if you are in that stage of life where dating is important for you, I think seems to be a good choice.
Jocular Almond: Yeah. Right. But I suppose if I'm not really thinking about dating at this stage and just kind of focused on my career, then you would recommend California and Seattle.
Red Maelstrom: Yeah. So anything between California and Seattle. I would recommend personally my choice would be Seattle because Seattle has no state one a person would end up saving more than Seattle. The only downside is like Seattle has more gloomy weather so you will see lesser sunlight as compared to California. So that is important for you. Then you should go for California. Otherwise Seattle is also decent.
Jocular Almond: Okay, and so what does no state tax mean? Does that mean like I still have to pay federal tax but not state?
Red Maelstrom: Yeah, you still have to pay the federal tax. A friend of mine who is in California pays up to 37% of tax on his income, whereas a friend in Seattle pays up to 29% of tax.
Jocular Almond: That's a full like 8% difference.
Red Maelstrom: Right. But the caveat is like companies do know this and there is a difference between salaries offered in California and Seattle, but I do still feel like the stocks and everything is same. So you will still end up saving more in Seattle?
Jocular Almond: Yes. Okay, so no state tax but more gloomy weather and then California. Cool. And I'll just bring it back eight to nine.
Red Maelstrom: Yeah, just this.
Jocular Almond: Seven to 80. But I should follow up on how tax treaty workshop.
Red Maelstrom: I'm just sharing you one link which would be helpful for you to get an idea around salaries or compensation in different companies in different cities as per.
Jocular Almond: The level.
Red Maelstrom: I have pasted in your chat. So you can choose the company, you can choose the level and you can filter based on the location and everything.
Jocular Almond: And so those levels, because I think I've seen this website before. Would you say that they're pretty accurate?
Red Maelstrom: Are you saying the levels or the compensation data?
Jocular Almond: The compensation data.
Red Maelstrom: It's pretty decent. Like I have cross checked my offers against. I have seen my offers around this range only.
Jocular Almond: Okay.
Red Maelstrom: There is another app you might be aware about, blind, which you can use for any such questions for it's an anonymous app, but you have to log in with so you can download it and you can anonymously post your questions. And I have seen people usually answering all these questions so you can ask these questions rather than taking one guy's opinion, right? So you can ask. Create a poll like what do you think? I've seen people creating posts like sharing their stage of layer life and giving options like what is the right choice for me? Which city is right choice for me? I've seen people doing that. So you can do that also if you want to do a thorough research before making a decision.
Jocular Almond: Thanks for that.
Red Maelstrom: Yeah, let me just post the link for that too.
Jocular Almond: Yeah.
Red Maelstrom: Just while signing up, you have to mention your country as us.
Jocular Almond: Okay.
Red Maelstrom: You are currently in us.
Jocular Almond: Okay, cool. One thing that I do kind of I'm thinking about at the moment is that is it worth to move to a city preemptively? Let's say I go through these rounds of interviews and I don't pass any interviews. Would it be worth to, let's say, get a remote job, move to America? Because I'm assuming that interviewers would care about where your location is at the moment. Right. They would prefer if you were already in the city.
Red Maelstrom: Personally, I don't have much data around it, but I do feel like if you are already in that country and there is no hassle of sponsoring your visa transfer and getting you through, because that process will take like two, three months at least. And if you're already there, available to join the job in next 15 to 30 days, you will definitely have more calls or more interviews lined up.
Jocular Almond: Yeah. Right. People who are in those geographic locations are going to have more of an advantage.
Red Maelstrom: But I don't have any personal data or backing story against us. I don't personally know any friend of mine who did this, but I do feel this is my gut feeling, not a database backed fact.
Jocular Almond: Because I feel like if I do apply for american jobs, they will technically have to sponsor me. Right. In order for me to actually work over there. Right. Because it's not as if I can just go and work there. Right. It has to follow the proper process.
Red Maelstrom: Right.
Jocular Almond: Okay, cool. Let me see if I have any other questions.
Red Maelstrom: You can always select to share your contact. So while writing feedback in that way, we will get each other's email and you can write your questions offline. Also, I'll try to answer them over email.
Jocular Almond: Okay. I would appreciate that, actually. That'd be great. Sure. Do you think that in terms of where I'm at at the moment, I would be ready to start applying for interviews?
Red Maelstrom: Yes.
Jocular Almond: Okay. Because I haven't actually taken a look at system design and behavioral, so I'm assuming I would have to practice that a lot as well.
Red Maelstrom: Yeah.
Jocular Almond: Cool. And would you practice, like, behavioral interviews a bit less than system design? I'm assuming that's kind of where. Or would you practice it as much as system design and algorithmic questions?
Red Maelstrom: I personally think a couple of behavioral practice should be enough.
Jocular Almond: Okay. So it's not something that I should practice as much as algorithmic questions?
Red Maelstrom: Yeah.
Jocular Almond: And then would you also practice, like, system design as much as you would practice algorithmic questions? Like, it's on the same level of importance?
Red Maelstrom: Definitely at your stage as you have just a couple of years of experience, I would definitely recommend to practice as much as algorithm.
Jocular Almond: Okay.
Red Maelstrom: If I'm targeting e four at meta, if I'm targeting e three meta, then no system design would be asked. But if you are targeting e four at meta, I think I would recommend having as much practice as algorithm.
Jocular Almond: Okay, cool. And I think just one last question. I don't want to take too much of your time. I think it's almost an hour now.
Red Maelstrom: No, I do have. I'm okay to stay if you have questions.
Jocular Almond: Okay, cool. Do you know if Google Meta and Amazon are hiring at the moment or do you think that they're slowing down or how do you feel about that?
Red Maelstrom: I do think things are picking up. I actually see my LinkedIn, in my LinkedIn, I'm still seeing recruiters reaching out. So I think like 24 would not be as great as 21, but it would definitely be better than 23.
Jocular Almond: Okay, let me see in terms of how would you actually apply to these companies? Do you have a specific process you follow or do companies tend to contact you? What usually happens there for you?
Red Maelstrom: Can you repeat the question? I didn't get the last.
Jocular Almond: So in terms of what happens before you actually interview? So how do they get you the interview or how do you get the interview? Do you usually apply online portal or do they usually contact you or what do you usually do?
Red Maelstrom: Sometimes they have reached out to me on LinkedIn. Sometimes I have reached out to recruiters from those companies on LinkedIn. Sometimes I've asked like friend of mine working there for referral. I think I never got, I tried applying directly on the website a few times, but I never got a call through that.
Jocular Almond: Yeah.
Red Maelstrom: I didn't do much.
Jocular Almond: Yeah, I've heard the application going through the online stuff is pretty much like a black hole.
Red Maelstrom: Yeah. So yeah, I think once you have my email address, I think I can also help you with few referrals.
Jocular Almond: Okay, cool. I appreciate that. Awesome. I think, honestly, I'm really grateful for the interview and also all your answers at the end as well. That was really helpful as well. I've been pretty stressed out and that really kind of put me at ease.
Red Maelstrom: No worries.
Jocular Almond: Yeah.
Red Maelstrom: Happy New year. I wish all your career aspirations get fulfilled in this year.
Jocular Almond: Awesome. Thank you. Happy New year.

We know exactly what to do and say to get the company, title, and salary you want.

Interview prep and job hunting are chaos and pain. We can help. Really.