title
How to Crack a Google Coding Interview - An Ex-Googler’s Guide
description
This is the process I would personally use to get through coding interviews with Google, or with any other company for that matter.
If you liked this video, I would also recommend my Udemy course, "11 Essential Coding Interview Questions":
https://www.udemy.com/11-essential-coding-interview-questions/?couponCode=HOWTOCRACK
(You'll get a discount through the link above.)
detail
{'title': 'How to Crack a Google Coding Interview - An Ex-Googler’s Guide', 'heatmap': [{'end': 64.748, 'start': 26.989, 'weight': 0.749}], 'summary': '《how to crack a google coding interview - an ex-googler’s guide》 covers problem-solving strategies and approaches, emphasizing optimal solutions, effective communication during coding interviews, and provides a solution to add 1 to an array with time complexity of o(n) and space complexity of o(n), also recommends a udemy course for further preparation.', 'chapters': [{'end': 203.702, 'segs': [{'end': 64.748, 'src': 'heatmap', 'start': 0.489, 'weight': 0, 'content': [{'end': 4.892, 'text': "Hey everyone, my name is YK, and I'm a former software developer at Google.", 'start': 0.489, 'duration': 4.403}, {'end': 12.217, 'text': "In this video, I'm going to walk you through the process I would personally use to get through an actual coding interview question from Google.", 'start': 5.573, 'duration': 6.644}, {'end': 16.46, 'text': "Here I'm going to use a question from Google as an example,", 'start': 12.998, 'duration': 3.462}, {'end': 20.844, 'text': "but you'll be able to use the same process to get through programming interviews with any company.", 'start': 16.46, 'duration': 4.384}, {'end': 26.288, 'text': 'And I chose a relatively simple problem here so that I can explain the whole process quickly.', 'start': 21.704, 'duration': 4.584}, {'end': 27.91, 'text': "Now here's the problem.", 'start': 26.989, 'duration': 0.921}, {'end': 33.575, 'text': "You're given an array of integers, for example 1324, which represents a number.", 'start': 28.33, 'duration': 5.245}, {'end': 36.278, 'text': 'This array represents 1324.', 'start': 34.696, 'duration': 1.582}, {'end': 40.582, 'text': 'And the problem is writing a function that takes this array and adds 1 to this number.', 'start': 36.278, 'duration': 4.304}, {'end': 56.759, 'text': "So your function, if you're given this array, should return 1325, which represents 1325.", 'start': 46.147, 'duration': 10.612}, {'end': 64.748, 'text': 'Now, how would I solve this problem? Let me walk you through the whole process I would personally use to solve this problem step by step.', 'start': 56.759, 'duration': 7.989}], 'summary': 'Yk, former google developer, walks through solving a coding interview question, adding 1 to an array of integers.', 'duration': 40.093, 'max_score': 0.489, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/uQdy914JRKQ/pics/uQdy914JRKQ489.jpg'}, {'end': 120.761, 'src': 'embed', 'start': 71.074, 'weight': 2, 'content': [{'end': 79.662, 'text': 'One of the clarifying questions you could ask here is, could this array be empty? And the interviewer might say, no, it cannot be empty.', 'start': 71.074, 'duration': 8.588}, {'end': 91.073, 'text': 'You could also ask can we always assume that each element of this array is always an integer between 0 and 9?', 'start': 80.683, 'duration': 10.39}, {'end': 93.235, 'text': "And let's say, it is indeed the case.", 'start': 91.073, 'duration': 2.162}, {'end': 98.238, 'text': 'so each element of this array is always an integer between 0 and 9..', 'start': 93.235, 'duration': 5.003}, {'end': 101.8, 'text': 'And you might ask a few more questions to clarify all the assumptions you have.', 'start': 98.238, 'duration': 3.562}, {'end': 108.385, 'text': 'Once you feel like you have enough information to start solving this problem, you should start with a high-level discussion.', 'start': 102.541, 'duration': 5.844}, {'end': 114.733, 'text': 'In this stage, just explain the ideas you have in concept first without using too much code.', 'start': 109.205, 'duration': 5.528}, {'end': 120.761, 'text': "And it's important not to start coding right away, especially for a more complex problem,", 'start': 115.434, 'duration': 5.327}], 'summary': 'Clarify array properties, discuss high-level idea before coding.', 'duration': 49.687, 'max_score': 71.074, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/uQdy914JRKQ/pics/uQdy914JRKQ71074.jpg'}], 'start': 0.489, 'title': 'Coding interview and problem solving strategies', 'summary': 'Covers solving a coding interview question by adding 1 to an array and discusses problem-solving strategies, emphasizing clarifying assumptions and avoiding immediate coding, applicable to any programming interview.', 'chapters': [{'end': 98.238, 'start': 0.489, 'title': 'Coding interview: adding 1 to an array', 'summary': 'Explains the process of solving a coding interview question by adding 1 to an array representing a number, using a simple example. it covers clarifying questions, high-level discussion, and the step-by-step approach, applicable to programming interviews with any company.', 'duration': 97.749, 'highlights': ['The chapter discusses the process of adding 1 to an array representing a number, using a simple example (1324), applicable to programming interviews with any company.', 'It emphasizes the step-by-step approach, starting with clarifying questions and a high-level discussion, such as whether the array could be empty or if each element is always an integer between 0 and 9.', 'The speaker, a former software developer at Google, walks through the process personally used to solve the problem step by step, providing a clear example and explanation.', 'The problem involves writing a function that takes an array and adds 1 to the represented number, as demonstrated by the example of transforming the array [1,3,2,4] to 1325.', 'The example problem chosen for explanation is relatively simple to enable a quick and comprehensive walkthrough of the entire process.']}, {'end': 203.702, 'start': 98.238, 'title': 'Problem solving strategies', 'summary': 'Discusses problem-solving strategies, emphasizing the importance of clarifying assumptions, starting with a high-level discussion, and avoiding immediate coding to save time, illustrated with a specific problem related to manipulating arrays and carrying over digits.', 'duration': 105.464, 'highlights': ["It's important to start with a high-level discussion and explain the ideas in concept without using too much code, especially for a more complex problem, to avoid wasting time writing code on a solution that doesn't work in the end.", 'Clarifying assumptions by asking questions can provide enough information to start solving a problem effectively.', 'Illustrating the problem-solving approach with a specific example of manipulating arrays and carrying over digits, with a focus on scenarios where the last integer is nine and addressing the tricky case of having 999 or 999 in the given array.']}], 'duration': 203.213, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/uQdy914JRKQ/pics/uQdy914JRKQ489.jpg', 'highlights': ['The chapter discusses the process of adding 1 to an array representing a number, using a simple example (1324), applicable to programming interviews with any company.', 'The problem involves writing a function that takes an array and adds 1 to the represented number, as demonstrated by the example of transforming the array [1,3,2,4] to 1325.', 'It emphasizes the step-by-step approach, starting with clarifying questions and a high-level discussion, such as whether the array could be empty or if each element is always an integer between 0 and 9.', "It's important to start with a high-level discussion and explain the ideas in concept without using too much code, especially for a more complex problem, to avoid wasting time writing code on a solution that doesn't work in the end.", 'The speaker, a former software developer at Google, walks through the process personally used to solve the problem step by step, providing a clear example and explanation.']}, {'end': 905.569, 'segs': [{'end': 258.266, 'src': 'embed', 'start': 231.041, 'weight': 0, 'content': [{'end': 235.145, 'text': "because it's rare for you to get to the optimal solution with your first idea.", 'start': 231.041, 'duration': 4.104}, {'end': 241.148, 'text': "If you're confident enough that your first idea is the optimal solution, then go for it.", 'start': 235.885, 'duration': 5.263}, {'end': 245.411, 'text': 'But if not, list out a few potential solutions before you start coding.', 'start': 241.228, 'duration': 4.183}, {'end': 250.074, 'text': 'Now on to step two, choose your approach and start coding.', 'start': 246.311, 'duration': 3.763}, {'end': 258.266, 'text': 'Here, in this example, you might say something like, well, I think the iterative solution is a good solution, so let me start coding with that.', 'start': 251.021, 'duration': 7.245}], 'summary': 'Rare to reach optimal solution with first idea. list potential solutions before coding. choose approach and start coding.', 'duration': 27.225, 'max_score': 231.041, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/uQdy914JRKQ/pics/uQdy914JRKQ231041.jpg'}, {'end': 302.813, 'src': 'embed', 'start': 272.995, 'weight': 1, 'content': [{'end': 277.517, 'text': "You're communicating more with the interviewer, which is always good in a coding interview.", 'start': 272.995, 'duration': 4.522}, {'end': 282.539, 'text': "And you're also making sure that you're going in the right direction just by asking that question.", 'start': 278.077, 'duration': 4.462}, {'end': 287.802, 'text': "Now, I'm going to switch to a Google Doc to explain this idea, just like a phone interview.", 'start': 283.5, 'duration': 4.302}, {'end': 293.305, 'text': "But if you're using a whiteboard to solve this problem in an in-person interview, it's the same idea.", 'start': 288.362, 'duration': 4.943}, {'end': 302.813, 'text': "I'm going to use Sudco to explain my solution here, but in the real interview usually you're supposed to use a real language, whether it's Python,", 'start': 294.245, 'duration': 8.568}], 'summary': 'Improved communication and direction in coding interviews, adapting to different interview formats and using appropriate tools and languages.', 'duration': 29.818, 'max_score': 272.995, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/uQdy914JRKQ/pics/uQdy914JRKQ272995.jpg'}, {'end': 659.409, 'src': 'embed', 'start': 629.182, 'weight': 3, 'content': [{'end': 634.023, 'text': "So we're creating a new array here with the length being one item longer than the given array.", 'start': 629.182, 'duration': 4.841}, {'end': 643.005, 'text': "And assuming that this initializes an array with all the elements being zero, we'll just need to set the first item to one.", 'start': 634.383, 'duration': 8.622}, {'end': 648.566, 'text': "And that way we'll be able to take care of this case when all the items are nine.", 'start': 643.605, 'duration': 4.961}, {'end': 651.907, 'text': 'After that, just return result.', 'start': 649.466, 'duration': 2.441}, {'end': 653.267, 'text': "And that's my solution.", 'start': 652.387, 'duration': 0.88}, {'end': 659.409, 'text': 'Now, step three, check your solution and discuss performance such as time and space complexity.', 'start': 653.767, 'duration': 5.642}], 'summary': 'Creating new array, setting first item to one to handle case when all items are nine, then returning result.', 'duration': 30.227, 'max_score': 629.182, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/uQdy914JRKQ/pics/uQdy914JRKQ629182.jpg'}, {'end': 863.012, 'src': 'embed', 'start': 831.956, 'weight': 4, 'content': [{'end': 840.179, 'text': 'Because we go through this entire array at most once or twice when we create a new array.', 'start': 831.956, 'duration': 8.223}, {'end': 848.681, 'text': 'in the case of 999, the time complexity is O, where n is the number of items in the given array.', 'start': 840.179, 'duration': 8.502}, {'end': 863.012, 'text': 'The space complexity will be O as well, because the most space we create is for the new array, which is O,', 'start': 849.321, 'duration': 13.691}], 'summary': 'Time complexity is o(n) and space complexity is o(n) for creating a new array.', 'duration': 31.056, 'max_score': 831.956, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/uQdy914JRKQ/pics/uQdy914JRKQ831956.jpg'}, {'end': 902.488, 'src': 'embed', 'start': 877.662, 'weight': 5, 'content': [{'end': 884.804, 'text': "And that's the framework I would personally use for cracking a Google coding interview or coding interviews from any other company for that matter.", 'start': 877.662, 'duration': 7.142}, {'end': 891.785, 'text': 'If you like this video, I would also recommend my course on Udemy 11 Essential Coding Interview Questions,', 'start': 885.724, 'duration': 6.061}, {'end': 897.307, 'text': 'in which I cover 11 of the most essential coding interview questions to master for your next coding interview.', 'start': 891.785, 'duration': 5.522}, {'end': 902.488, 'text': "In case you're interested in taking the course, I put a discount code below in the description.", 'start': 898.227, 'duration': 4.261}], 'summary': 'Framework for coding interview success: 11 essential questions covered in udemy course.', 'duration': 24.826, 'max_score': 877.662, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/uQdy914JRKQ/pics/uQdy914JRKQ877662.jpg'}], 'start': 203.702, 'title': 'Problem-solving approaches and coding interview tips', 'summary': 'Emphasizes problem-solving approaches, optimal solutions, and effective communication during coding interviews, and provides a solution to add 1 to an array with time complexity of o(n) and space complexity of o(n), along with a recommended udemy course for further preparation.', 'chapters': [{'end': 293.305, 'start': 203.702, 'title': 'Problem-solving approaches and coding interview tips', 'summary': 'Emphasizes the importance of listing potential problem-solving approaches, choosing the optimal solution, and effectively communicating with the interviewer during a coding interview.', 'duration': 89.603, 'highlights': ["The chapter stresses the importance of listing out potential problem-solving approaches before starting to code, as it's rare to get to the optimal solution with the first idea.", 'Emphasizes the significance of effective communication with the interviewer during a coding interview, suggesting asking questions to ensure the chosen approach is correct and optimal.', 'Recommends choosing the approach and confidently starting the coding process, while also encouraging communication with the interviewer for validation and guidance.']}, {'end': 905.569, 'start': 294.245, 'title': 'Coding interview: adding 1 to an array', 'summary': 'Explains a solution to add 1 to an array, iterating through the array to calculate the sum, time complexity of o(n), space complexity of o(n), and recommends a udemy course for further coding interview preparation.', 'duration': 611.324, 'highlights': ['The chapter explains a solution to add 1 to an array, iterating through the array to calculate the sum. The speaker discusses the process of adding 1 to an array, iterating through the array to calculate the sum, considering edge cases like adding 1 to an array of all 9s.', 'Time complexity of O(n) and space complexity of O(n). The time complexity is O(n) as the array is traversed once or twice, and the space complexity is O(n) due to the new array creation.', "Recommends a Udemy course for further coding interview preparation. The speaker recommends their Udemy course '11 Essential Coding Interview Questions' for further coding interview preparation, providing a discount code in the description."]}], 'duration': 701.867, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/uQdy914JRKQ/pics/uQdy914JRKQ203702.jpg', 'highlights': ["The chapter stresses the importance of listing out potential problem-solving approaches before starting to code, as it's rare to get to the optimal solution with the first idea.", 'Emphasizes the significance of effective communication with the interviewer during a coding interview, suggesting asking questions to ensure the chosen approach is correct and optimal.', 'Recommends choosing the approach and confidently starting the coding process, while also encouraging communication with the interviewer for validation and guidance.', 'The chapter explains a solution to add 1 to an array, iterating through the array to calculate the sum, considering edge cases like adding 1 to an array of all 9s.', 'Time complexity of O(n) and space complexity of O(n). The time complexity is O(n) as the array is traversed once or twice, and the space complexity is O(n) due to the new array creation.', "Recommends a Udemy course for further coding interview preparation. The speaker recommends their Udemy course '11 Essential Coding Interview Questions' for further coding interview preparation, providing a discount code in the description."]}], 'highlights': ['The chapter discusses the process of adding 1 to an array representing a number, using a simple example (1324), applicable to programming interviews with any company.', 'The problem involves writing a function that takes an array and adds 1 to the represented number, as demonstrated by the example of transforming the array [1,3,2,4] to 1325.', "The chapter stresses the importance of listing out potential problem-solving approaches before starting to code, as it's rare to get to the optimal solution with the first idea.", 'Emphasizes the significance of effective communication with the interviewer during a coding interview, suggesting asking questions to ensure the chosen approach is correct and optimal.', 'Recommends choosing the approach and confidently starting the coding process, while also encouraging communication with the interviewer for validation and guidance.', 'The chapter explains a solution to add 1 to an array, iterating through the array to calculate the sum, considering edge cases like adding 1 to an array of all 9s.', 'Time complexity of O(n) and space complexity of O(n). The time complexity is O(n) as the array is traversed once or twice, and the space complexity is O(n) due to the new array creation.', "Recommends a Udemy course for further coding interview preparation. The speaker recommends their Udemy course '11 Essential Coding Interview Questions' for further coding interview preparation, providing a discount code in the description."]}