title
Time and Space Complexity - Strivers A2Z DSA Course

description
Full Course: https://takeuforward.org/strivers-a2z-dsa-course/strivers-a2z-dsa-course-sheet-2/ Notes: https://takeuforward.org/time-complexity/time-and-space-complexity-strivers-a2z-dsa-course/ In case you are thinking to buy courses, please check below: Link to get 20% additional Discount at Coding Ninjas: https://bit.ly/3wE5aHx Code "takeuforward" for 15% off at GFG: https://practice.geeksforgeeks.org/courses Code "takeuforward" for 20% off on sys-design: https://get.interviewready.io/?_aff=takeuforward You can follow me across social media, all my handles are below: Linkedin/Instagram/Telegram: https://linktr.ee/takeUforward

detail
{'title': 'Time and Space Complexity - Strivers A2Z DSA Course', 'heatmap': [{'end': 363.515, 'start': 337.661, 'weight': 0.709}, {'end': 1506.707, 'start': 1437.083, 'weight': 0.796}, {'end': 1672.818, 'start': 1604.378, 'weight': 0.731}, {'end': 1758.385, 'start': 1734.823, 'weight': 0.752}], 'summary': 'Covers time complexity basics, big o notation, rules, nested for loop complexity, and space complexity, with emphasis on problem-solving for coding interviews and code optimization, highlighting the significance of time and space complexity in software engineering interviews and server operations.', 'chapters': [{'end': 241.932, 'segs': [{'end': 63.206, 'src': 'embed', 'start': 22.89, 'weight': 0, 'content': [{'end': 25.671, 'text': 'learn basics and then analyze the next steps.', 'start': 22.89, 'duration': 2.781}, {'end': 26.692, 'text': 'what does that mean?', 'start': 25.671, 'duration': 1.021}, {'end': 28.753, 'text': "i'll be teaching the basics of time complexity.", 'start': 26.692, 'duration': 2.061}, {'end': 30.254, 'text': 'what is time complexity?', 'start': 28.753, 'duration': 1.501}, {'end': 33.936, 'text': 'how to compute time complexity and all the terms related to it.', 'start': 30.254, 'duration': 3.682}, {'end': 39.879, 'text': 'and then eventually, when you go through all the latest steps at every problem that we solve,', 'start': 33.936, 'duration': 5.943}, {'end': 43.141, 'text': 'we will be discussing time complexity of every problem in depth.', 'start': 39.879, 'duration': 3.262}, {'end': 47.903, 'text': 'so eventually, when you complete all the steps or all the problems, you will have a very,', 'start': 43.141, 'duration': 4.762}, {'end': 51.504, 'text': 'very good hold on the time complexity part now in this video.', 'start': 47.903, 'duration': 3.601}, {'end': 56.665, 'text': 'i cannot teach you time complexity of, uh, very complex codes because you do not know them right.', 'start': 51.504, 'duration': 5.161}, {'end': 63.206, 'text': 'so once you learn the complex codes and recursion, backtracking, we will be discussing time complexity in depth over here.', 'start': 56.665, 'duration': 6.541}], 'summary': 'Teach basics of time complexity, analyzing steps, and discussing complexity of problems in depth.', 'duration': 40.316, 'max_score': 22.89, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E22890.jpg'}, {'end': 163.385, 'src': 'embed', 'start': 111.153, 'weight': 5, 'content': [{'end': 120.224, 'text': "in every interview they're going to analyze you what is the time complexity and what is the space complexity, and then on the basis of that,", 'start': 111.153, 'duration': 9.071}, {'end': 122.166, 'text': 'you will be judged right.', 'start': 120.224, 'duration': 1.942}, {'end': 130.589, 'text': "so Whenever you write a code that might end up taking, let's say, two seconds on a machine, or might end up taking three seconds on a machine,", 'start': 122.166, 'duration': 8.423}, {'end': 133.009, 'text': 'might end up taking five seconds on a machine.', 'start': 130.589, 'duration': 2.42}, {'end': 138.27, 'text': 'So the time taken, will you call it the time complexity? No.', 'start': 133.429, 'duration': 4.841}, {'end': 144.771, 'text': 'You will never call time complexity as time taken.', 'start': 139.31, 'duration': 5.461}, {'end': 151.07, 'text': 'Now you might ask, but why? If a code is taking certain time, that should be its time complexity.', 'start': 145.312, 'duration': 5.758}, {'end': 154.497, 'text': "Let's give you a very, very easy example to explain why not.", 'start': 151.411, 'duration': 3.086}, {'end': 158.204, 'text': 'Imagine I take this code, take this code.', 'start': 155.018, 'duration': 3.186}, {'end': 160.265, 'text': 'this can be any code, any code.', 'start': 158.204, 'duration': 2.061}, {'end': 163.385, 'text': 'i take this code and i run it on two machines.', 'start': 160.265, 'duration': 3.12}], 'summary': 'In interviews, code is judged based on time and space complexity, not the actual time taken for execution.', 'duration': 52.232, 'max_score': 111.153, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E111153.jpg'}, {'end': 241.932, 'src': 'embed', 'start': 208.149, 'weight': 4, 'content': [{'end': 211.39, 'text': 'it is dependent on configuration, right?', 'start': 208.149, 'duration': 3.241}, {'end': 212.771, 'text': 'So this is why that is.', 'start': 211.43, 'duration': 1.341}, {'end': 213.451, 'text': 'this is the first point.', 'start': 212.771, 'duration': 0.68}, {'end': 217.493, 'text': 'Time taken is never equal to time taken, never ever.', 'start': 213.951, 'duration': 3.542}, {'end': 224.616, 'text': 'So you might ask, if time complexity is not time taken, then what is it? That is where I see the definition.', 'start': 218.093, 'duration': 6.523}, {'end': 225.997, 'text': 'The rate.', 'start': 225.056, 'duration': 0.941}, {'end': 241.932, 'text': 'remember the rate at which the time taken increases, The rate at which the time taken increases with respect to the input,', 'start': 225.997, 'duration': 15.935}], 'summary': 'Dependent on configuration, time complexity is the rate at which time taken increases with respect to input.', 'duration': 33.783, 'max_score': 208.149, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E208149.jpg'}], 'start': 3.37, 'title': 'Understanding time complexity in coding', 'summary': 'Covers the basics of time complexity, computation, and analysis for problem-solving, laying the foundation for a comprehensive understanding. it also explains the importance of time complexity in coding interviews and defines time complexity as the rate at which the time taken increases with respect to the input.', 'chapters': [{'end': 63.206, 'start': 3.37, 'title': 'Understanding time complexity', 'summary': 'Covers the basics of time complexity, including its definition, computation, and analysis of time complexity for problem-solving, laying the foundation for a comprehensive understanding of time complexity in future lectures.', 'duration': 59.836, 'highlights': ['The lecture focuses on teaching the basics of time complexity, including its definition, computation, and related terms, preparing students for in-depth analysis of time complexity in problem-solving.', 'The instructor emphasizes that a thorough understanding of time complexity will be gained by completing all the steps or problems, providing a strong grasp on the topic.', 'The video will discuss time complexity in depth once students have learned complex codes, recursion, and backtracking, offering a comprehensive analysis of time complexity for advanced concepts.', 'The instructor mentions that the lecture will not cover time complexity for very complex codes initially, as students are not familiar with them, indicating a progressive approach to teaching time complexity.']}, {'end': 241.932, 'start': 63.206, 'title': 'Understanding time complexity in coding', 'summary': 'Explains the importance of time complexity in coding interviews, emphasizing that time taken is not equal to time complexity and defining time complexity as the rate at which the time taken increases with respect to the input.', 'duration': 178.726, 'highlights': ['Time taken is never equal to time taken, never ever. The speaker emphasizes that time taken is not equivalent to time complexity, providing an example of how the time taken for code execution can vary depending on the system and configuration.', 'Defining time complexity as the rate at which the time taken increases with respect to the input. The definition of time complexity is explained as the rate at which the time taken increases in relation to the input size, indicating the importance of understanding this concept in coding interviews.', 'Analyzing the time complexity and space complexity in every interview to judge the code. The speaker highlights that interviewers analyze the time complexity and space complexity of code in every interview to evaluate the performance, emphasizing the significance of these factors in coding assessments.']}], 'duration': 238.562, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E3370.jpg', 'highlights': ['The lecture focuses on teaching the basics of time complexity, including its definition, computation, and related terms, preparing students for in-depth analysis of time complexity in problem-solving.', 'The instructor emphasizes that a thorough understanding of time complexity will be gained by completing all the steps or problems, providing a strong grasp on the topic.', 'The video will discuss time complexity in depth once students have learned complex codes, recursion, and backtracking, offering a comprehensive analysis of time complexity for advanced concepts.', 'The instructor mentions that the lecture will not cover time complexity for very complex codes initially, as students are not familiar with them, indicating a progressive approach to teaching time complexity.', 'Defining time complexity as the rate at which the time taken increases with respect to the input. The definition of time complexity is explained as the rate at which the time taken increases in relation to the input size, indicating the importance of understanding this concept in coding interviews.', 'Analyzing the time complexity and space complexity in every interview to judge the code. The speaker highlights that interviewers analyze the time complexity and space complexity of code in every interview to evaluate the performance, emphasizing the significance of these factors in coding assessments.', 'The instructor emphasizes that time taken is not equivalent to time complexity, providing an example of how the time taken for code execution can vary depending on the system and configuration.']}, {'end': 496.95, 'segs': [{'end': 370.898, 'src': 'heatmap', 'start': 333.679, 'weight': 0, 'content': [{'end': 337.161, 'text': 'And this theta is the rate for the new MacBook.', 'start': 333.679, 'duration': 3.482}, {'end': 346.386, 'text': 'So I can say the rate at which it increases time is what you call as time complexity.', 'start': 337.661, 'duration': 8.725}, {'end': 351.469, 'text': "Depending on the input, if they're giving you more input, it might end up taking a certain more time.", 'start': 347.027, 'duration': 4.442}, {'end': 359.614, 'text': 'So the rate at which the time increases is what is generally referred as time complexity of any given code.', 'start': 351.709, 'duration': 7.905}, {'end': 363.515, 'text': 'The next question that might come to your brain is okay, Stryber.', 'start': 360.134, 'duration': 3.381}, {'end': 370.898, 'text': 'if we are saying the time complexity is not computed in terms of seconds or minutes, then how do we write it?', 'start': 363.515, 'duration': 7.383}], 'summary': 'Theta represents the rate of increase for time complexity in code based on input.', 'duration': 37.219, 'max_score': 333.679, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E333679.jpg'}, {'end': 419.559, 'src': 'embed', 'start': 387.233, 'weight': 1, 'content': [{'end': 389.214, 'text': 'That is when you do not, like you will not say two seconds.', 'start': 387.233, 'duration': 1.981}, {'end': 392.775, 'text': 'No, you will say it in terms of big O notation.', 'start': 389.754, 'duration': 3.021}, {'end': 397.296, 'text': 'Every piece of code takes time in terms of big O notation.', 'start': 393.375, 'duration': 3.921}, {'end': 400.537, 'text': "What is big O notation? I'll just give you a prime example.", 'start': 397.716, 'duration': 2.821}, {'end': 405.739, 'text': "So it's like a capital O, open parenthesis and a close parenthesis.", 'start': 401.097, 'duration': 4.642}, {'end': 412.977, 'text': 'this is what bigot notation is, and inside it you write whatever the time is taken.', 'start': 406.295, 'duration': 6.682}, {'end': 419.559, 'text': "inside. is you write the time taken or the hypothetical time, which i'll show you how to compute?", 'start': 412.977, 'duration': 6.582}], 'summary': 'Explanation of big o notation for time complexity in coding.', 'duration': 32.326, 'max_score': 387.233, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E387233.jpg'}], 'start': 241.932, 'title': 'Time complexity and big o notation', 'summary': 'Explains time complexity in computing through a graph comparing old windows machine and new macbook, introduces big o notation with examples, and emphasizes the importance of counting steps.', 'chapters': [{'end': 359.614, 'start': 241.932, 'title': 'Understanding time complexity in computing', 'summary': 'Explains time complexity in computing using a graph to show the varying time taken by an old windows machine and a new macbook for different input sizes, highlighting the concept of rate of increase and time complexity.', 'duration': 117.682, 'highlights': ['The rate at which the time increases is what is generally referred as time complexity of any given code, with the old Windows machine taking longer time for increasing input sizes compared to the new MacBook.', 'The rate of increase, or theta angle, indicates the time complexity, with the old Windows machine showing a steeper increase compared to the new MacBook for increasing input sizes.', 'The time taken by the old Windows machine for input size 10 is 2 seconds, for input size 20 is 4 seconds, and for input size 30 is 6 seconds, showcasing the increasing time with input size.']}, {'end': 438.479, 'start': 360.134, 'title': 'Understanding time complexity and big o notation', 'summary': 'Explains the concept of time complexity in terms of big o notation used to analyze the time taken by code, emphasizing its importance in interviews and examinations and providing a simple example of computing the time complexity of a for loop.', 'duration': 78.345, 'highlights': ['The importance of using big O notation in analyzing time complexity in coding interviews and examinations is emphasized. The chapter emphasizes the significance of using big O notation to analyze time complexity in coding interviews and examinations.', 'Explanation of big O notation and its usage to represent the time taken by code is provided. The chapter explains big O notation as a way to represent the time taken by code and its usage in analysis.', 'Example of computing the time complexity of a for loop is given. The chapter provides a simple example of computing the time complexity of a for loop, demonstrating the practical application of the concept.']}, {'end': 496.95, 'start': 439.299, 'title': 'Big o notation and counting steps', 'summary': 'Explains the concept of big o notation as a way to measure the number of steps in code, using rules to avoid manually counting steps, and emphasizing the importance of computing every step.', 'duration': 57.651, 'highlights': ['Big O notation measures the number of steps in code, helping to avoid manually counting steps and emphasizing the importance of computing every step.', 'The process involves assigning, comparing, and printing steps, followed by rules to avoid the manual counting of steps.']}], 'duration': 255.018, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E241932.jpg', 'highlights': ['The rate at which the time increases is generally referred to as time complexity, with the old Windows machine taking longer time for increasing input sizes compared to the new MacBook.', 'The importance of using big O notation in analyzing time complexity in coding interviews and examinations is emphasized.', 'Big O notation measures the number of steps in code, helping to avoid manually counting steps and emphasizing the importance of computing every step.']}, {'end': 1110.923, 'segs': [{'end': 534.841, 'src': 'embed', 'start': 498.319, 'weight': 0, 'content': [{'end': 499.399, 'text': 'The three rules are very simple.', 'start': 498.319, 'duration': 1.08}, {'end': 504.341, 'text': 'Always compute time complexity in terms of worst case scenario.', 'start': 499.939, 'duration': 4.402}, {'end': 511.603, 'text': 'Time complexity to be computed in terms of worst case scenario.', 'start': 504.941, 'duration': 6.662}, {'end': 513.102, 'text': "Why worst case? I'll explain you.", 'start': 511.663, 'duration': 1.439}, {'end': 516.063, 'text': 'The next one is avoid constants.', 'start': 513.663, 'duration': 2.4}, {'end': 519.424, 'text': 'Avoid constants.', 'start': 518.284, 'duration': 1.14}, {'end': 525.507, 'text': 'And the third is avoid lower values.', 'start': 521.186, 'duration': 4.321}, {'end': 534.841, 'text': "So if I have to compute the time complexity or the bigot of this piece of code, let's look at it on a very high level.", 'start': 526.837, 'duration': 8.004}], 'summary': 'Compute time complexity in worst case, avoid constants and lower values.', 'duration': 36.522, 'max_score': 498.319, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E498319.jpg'}, {'end': 665.494, 'src': 'embed', 'start': 636.357, 'weight': 1, 'content': [{'end': 640.858, 'text': "Does that make sense? It does, right? Okay, let's now come back to the three points that I've written.", 'start': 636.357, 'duration': 4.501}, {'end': 646.499, 'text': 'Always compute time complexity in terms of worst case scenario.', 'start': 641.518, 'duration': 4.981}, {'end': 647.58, 'text': 'Now there are three things.', 'start': 646.759, 'duration': 0.821}, {'end': 649.8, 'text': 'One is the best case.', 'start': 648.58, 'duration': 1.22}, {'end': 653.781, 'text': 'One is the average case.', 'start': 651.981, 'duration': 1.8}, {'end': 657.507, 'text': 'and the other one is the worst case.', 'start': 654.884, 'duration': 2.623}, {'end': 665.494, 'text': "now let's take a snippet of the code and explain you what is best case, what is average case and what is worst case.", 'start': 657.507, 'duration': 7.987}], 'summary': 'Compute time complexity in best, average, and worst cases.', 'duration': 29.137, 'max_score': 636.357, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E636357.jpg'}, {'end': 865.412, 'src': 'embed', 'start': 834.856, 'weight': 2, 'content': [{'end': 836.917, 'text': 'That is why when I talk about time complexity.', 'start': 834.856, 'duration': 2.061}, {'end': 844.611, 'text': "Your code's extreme worst case is what is considered while computing time complexity.", 'start': 837.625, 'duration': 6.986}, {'end': 847.053, 'text': "Now, let's talk about constants.", 'start': 844.931, 'duration': 2.122}, {'end': 848.855, 'text': "I'm saying avoid constants.", 'start': 847.574, 'duration': 1.281}, {'end': 852.138, 'text': "Why am I saying that? Let's take a shuttle example.", 'start': 848.975, 'duration': 3.163}, {'end': 859.404, 'text': "Let's take something like 4n cubed, something like 3n squared plus 8.", 'start': 852.498, 'duration': 6.906}, {'end': 859.924, 'text': "Let's take this.", 'start': 859.404, 'duration': 0.52}, {'end': 865.412, 'text': 'So over here, 4 n cube plus 3 n square plus 8.', 'start': 860.825, 'duration': 4.587}], 'summary': 'Time complexity considers extreme worst case and focuses on avoiding constants.', 'duration': 30.556, 'max_score': 834.856, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E834856.jpg'}], 'start': 498.319, 'title': 'Time complexity rules and notation', 'summary': 'Covers three rules for computing time complexity, emphasizing worst case scenario, avoiding constants, and considering higher values, along with examples. it also explains the importance of time complexity, best case scenario, and introduces big o notation for code optimization in interviews.', 'chapters': [{'end': 636.137, 'start': 498.319, 'title': 'Computing time complexity rules', 'summary': 'Explains the three rules for computing time complexity, emphasizing the worst case scenario, avoiding constants, and considering higher values, with an example of computing time complexity for a given piece of code.', 'duration': 137.818, 'highlights': ['The chapter emphasizes computing time complexity in terms of worst case scenario, avoiding constants, and considering higher values, with an example of computing time complexity for a given piece of code.', 'The for loop in the example is analyzed to run for 15 times, demonstrating the calculation of time complexity based on the number of operations.', 'The concept of changing the loop condition to less than or equal to n is discussed, leading to the understanding that the loop will run n times with 3 operations at each iteration, resulting in a time complexity of 3n.']}, {'end': 834.275, 'start': 636.357, 'title': 'Time complexity and best case scenario', 'summary': 'Explains the importance of computing time complexity in terms of worst case scenario and provides a clear example of best, worst, and average case scenarios for analyzing time complexity.', 'duration': 197.918, 'highlights': ['The importance of computing time complexity in terms of worst case scenario is emphasized to ensure that the code can handle the maximum workload, with an example of best, worst, and average case scenarios provided for clarity. Emphasizes the significance of computing time complexity in worst case scenario for code scalability, and provides an example of best, worst, and average case scenarios for clarity.', 'Explanation of best case, worst case, and average case scenarios for analyzing time complexity is provided with a simple code snippet, illustrating the number of operations for different input values. Provides a simple code snippet to explain best, worst, and average case scenarios for time complexity analysis, demonstrating the number of operations for different input values.']}, {'end': 1110.923, 'start': 834.856, 'title': 'Time complexity and big o notation', 'summary': 'Explains time complexity and the importance of avoiding constants, lower values, and provides an overview of big o notation and its significance for code optimization in interviews.', 'duration': 276.067, 'highlights': ['The chapter explains the importance of avoiding constants in time complexity and provides an example of how adding a constant, such as 8, becomes insignificant when dealing with large input sizes, reinforcing the need to avoid considering constants in time complexity calculations. Example of 4n^3 + 3n^2 + 8 with input size n=10^5', 'It emphasizes the significance of avoiding lower values in time complexity calculations and illustrates that adding 10^10 to 10^15 has no significant impact, emphasizing the need to avoid lower values to maintain accuracy in complexity analysis. Example of adding 10^10 to 10^15', 'Provides an overview of big O notation and its significance for code optimization in interviews, highlighting its role as the highest complexity or worst-case complexity expressed in interviews, emphasizing its importance for problem-solving and code expression during interviews. Explanation of big O notation and its significance for code optimization in interviews']}], 'duration': 612.604, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E498319.jpg', 'highlights': ['The chapter emphasizes computing time complexity in terms of worst case scenario, avoiding constants, and considering higher values, with an example of computing time complexity for a given piece of code.', 'The importance of computing time complexity in terms of worst case scenario is emphasized to ensure that the code can handle the maximum workload, with an example of best, worst, and average case scenarios provided for clarity.', 'The chapter explains the importance of avoiding constants in time complexity and provides an example of how adding a constant, such as 8, becomes insignificant when dealing with large input sizes, reinforcing the need to avoid considering constants in time complexity calculations.', 'Explanation of best case, worst case, and average case scenarios for analyzing time complexity is provided with a simple code snippet, illustrating the number of operations for different input values.']}, {'end': 1541.623, 'segs': [{'end': 1135.094, 'src': 'embed', 'start': 1110.923, 'weight': 2, 'content': [{'end': 1118.428, 'text': 'there are a lot of theoretical stuffs revolving around bigo, theta, omega, a lot of limit derivations.', 'start': 1110.923, 'duration': 7.505}, {'end': 1120.909, 'text': 'but i am not teaching you theory stuff.', 'start': 1118.428, 'duration': 2.481}, {'end': 1124.111, 'text': "i'm not teaching you for your semester examinations.", 'start': 1120.909, 'duration': 3.202}, {'end': 1126.151, 'text': 'I am teaching you for interviews.', 'start': 1124.631, 'duration': 1.52}, {'end': 1131.013, 'text': 'I am preparing you for the DSA coding rounds and they will not be asking it.', 'start': 1126.171, 'duration': 4.842}, {'end': 1133.654, 'text': "Over there, they'll be asking you programming logic.", 'start': 1131.613, 'duration': 2.041}, {'end': 1135.094, 'text': "You'll have to solve problems.", 'start': 1133.974, 'duration': 1.12}], 'summary': 'Preparing for dsa coding rounds for interviews, focusing on programming logic and problem-solving.', 'duration': 24.171, 'max_score': 1110.923, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1110923.jpg'}, {'end': 1189.503, 'src': 'embed', 'start': 1153.183, 'weight': 0, 'content': [{'end': 1160.486, 'text': 'So please do not comment that you did not teach the mathematical derivation, because that is something which is not required.', 'start': 1153.183, 'duration': 7.303}, {'end': 1162.066, 'text': 'while problem solving right?', 'start': 1160.486, 'duration': 1.58}, {'end': 1164.247, 'text': 'So you know how to compute big O now.', 'start': 1162.566, 'duration': 1.681}, {'end': 1165.587, 'text': "Let's do one thing.", 'start': 1164.607, 'duration': 0.98}, {'end': 1169.028, 'text': "Let's quickly solve some questions.", 'start': 1165.647, 'duration': 3.381}, {'end': 1173.17, 'text': 'The first snippet of the code for which you have to find the time complexity.', 'start': 1169.889, 'duration': 3.281}, {'end': 1189.503, 'text': 'Imagine inside your main you have something like int i equal to 0, i lesser than n i plus plus, And for int j equal to 0, j less than n j plus plus.', 'start': 1173.81, 'duration': 15.693}], 'summary': 'Teaching mathematical derivation not required. focus on computing big o and solving problems.', 'duration': 36.32, 'max_score': 1153.183, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1153183.jpg'}, {'end': 1394.593, 'src': 'embed', 'start': 1361.407, 'weight': 1, 'content': [{'end': 1363.249, 'text': 'so we go off.', 'start': 1361.407, 'duration': 1.842}, {'end': 1369.474, 'text': 'n square is what is the time complexity of this particular loop?', 'start': 1364.571, 'duration': 4.903}, {'end': 1372.736, 'text': "Let's take the next example and try to compute the time complexity of this one.", 'start': 1369.494, 'duration': 3.242}, {'end': 1382.851, 'text': "So it's like the first loop is definitely running for n and the second loop is running from zero to i.", 'start': 1373.197, 'duration': 9.654}, {'end': 1386.752, 'text': "so let's analyze slowly and probably we'll get the time.", 'start': 1382.851, 'duration': 3.901}, {'end': 1394.593, 'text': 'complexity. so can i say if i equal to zero, j is nothing, but from zero is only running for zero.', 'start': 1386.752, 'duration': 7.841}], 'summary': 'Analyzing time complexity of nested loops, aiming to determine the time complexity of the given code.', 'duration': 33.186, 'max_score': 1361.407, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1361407.jpg'}, {'end': 1506.707, 'src': 'heatmap', 'start': 1437.083, 'weight': 0.796, 'content': [{'end': 1440.245, 'text': "Again, I'm ignoring all these constant operations.", 'start': 1437.083, 'duration': 3.162}, {'end': 1442.727, 'text': "I'm taking the overall iterations.", 'start': 1440.666, 'duration': 2.061}, {'end': 1445.209, 'text': "Now, the first time, it's 1 iteration.", 'start': 1443.488, 'duration': 1.721}, {'end': 1446.45, 'text': "Next time, it's 2.", 'start': 1445.509, 'duration': 0.941}, {'end': 1447.59, 'text': "Next time, it's 3.", 'start': 1446.45, 'duration': 1.14}, {'end': 1448.531, 'text': '4 until n.', 'start': 1447.59, 'duration': 0.941}, {'end': 1452.454, 'text': 'So, can I say the number of iterations? The first time, it is 1.', 'start': 1448.531, 'duration': 3.923}, {'end': 1453.714, 'text': 'The next time, it is 2.', 'start': 1452.454, 'duration': 1.26}, {'end': 1454.275, 'text': 'The next time, it is 3.', 'start': 1453.714, 'duration': 0.561}, {'end': 1456.156, 'text': 'The next time, it is 4.', 'start': 1454.275, 'duration': 1.881}, {'end': 1457.177, 'text': 'So on till n iterations.', 'start': 1456.156, 'duration': 1.021}, {'end': 1464.457, 'text': 'Can I say that? And do you remember the formula for this particular thing? Some of the first n natural numbers.', 'start': 1457.93, 'duration': 6.527}, {'end': 1465.518, 'text': 'Simple maths.', 'start': 1464.937, 'duration': 0.581}, {'end': 1470.463, 'text': 'n into n plus 1 whole divided by 2.', 'start': 1466.399, 'duration': 4.064}, {'end': 1476.67, 'text': 'Which is nothing but n squared by 2 plus can I say n by 2.', 'start': 1470.463, 'duration': 6.207}, {'end': 1481.895, 'text': 'Thereby This is the exact time complex.', 'start': 1476.67, 'duration': 5.225}, {'end': 1488.078, 'text': 'But we can avoid, if you remember the rules, constant to be avoided, like the smaller values to be avoided.', 'start': 1482.415, 'duration': 5.663}, {'end': 1491.42, 'text': 'So, it will be like n square by 2.', 'start': 1488.098, 'duration': 3.322}, {'end': 1493.701, 'text': 'So, this is the time complexity.', 'start': 1491.42, 'duration': 2.281}, {'end': 1502.005, 'text': 'Again, if you try to remove the constants like 1 by half, you can say the time complexity is near about, we go of n square.', 'start': 1494.121, 'duration': 7.884}, {'end': 1506.707, 'text': 'But if someone does ask you the exact time complexity, this is the exact time complexity.', 'start': 1502.225, 'duration': 4.482}], 'summary': 'Time complexity is approximately o(n^2), with exact calculation of n*(n+1)/2', 'duration': 69.624, 'max_score': 1437.083, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1437083.jpg'}], 'start': 1110.923, 'title': 'Time and nested for loop complexity', 'summary': 'Emphasizes the importance of learning time complexity for coding interviews, focusing on practical problem-solving abilities. it discusses the time complexity of nested for loops, concluding that the time complexity is n^2 and n^2/2, with a detailed analysis of iterations and constant operations.', 'chapters': [{'end': 1231.504, 'start': 1110.923, 'title': 'Time complexity for coding interviews', 'summary': 'Emphasizes the importance of learning time complexity for coding interviews, focusing on problem-solving abilities, not theoretical derivations, and providing a practical example to analyze time complexity of code snippets.', 'duration': 120.581, 'highlights': ['The chapter emphasizes the importance of learning time complexity for coding interviews, focusing on problem-solving abilities, not theoretical derivations.', 'The instructor prepares students for DSA coding rounds and emphasizes that they will be asked programming logic, not theoretical formulas, for big O notation and limits.', 'The chapter provides a practical example to analyze time complexity of code snippets, encouraging viewers to pause and think about the time complexity of a given code.', 'The instructor explains that time complexity is computed in terms of big O notation and provides a practical example of analyzing the time complexity of a code snippet.']}, {'end': 1541.623, 'start': 1232.184, 'title': 'Nested for loop time complexity', 'summary': 'Discusses the time complexity of nested for loops, concluding that the time complexity is n^2 and n^2/2, following the formula for sum of first n natural numbers, with a detailed analysis of iterations and constant operations.', 'duration': 309.439, 'highlights': ['The time complexity of the nested for loop is determined to be n^2, as it runs for n times and then for n times again, totaling n^2 iterations.', "The analysis of the nested for loop's time complexity includes a detailed breakdown of iterations, with the conclusion that it follows the formula for the sum of the first n natural numbers, resulting in a time complexity of n^2/2."]}], 'duration': 430.7, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1110923.jpg', 'highlights': ['The chapter emphasizes the importance of learning time complexity for coding interviews, focusing on practical problem-solving abilities.', 'The time complexity of the nested for loop is determined to be n^2, as it runs for n times and then for n times again, totaling n^2 iterations.', 'The instructor prepares students for DSA coding rounds and emphasizes that they will be asked programming logic, not theoretical formulas, for big O notation and limits.']}, {'end': 1856.004, 'segs': [{'end': 1596.153, 'src': 'embed', 'start': 1566.57, 'weight': 0, 'content': [{'end': 1571.651, 'text': "It's the memory space that your program takes in a very, very naive term.", 'start': 1566.57, 'duration': 5.081}, {'end': 1577.853, 'text': 'When I talk about memory space, again, it will vary from machine to machine.', 'start': 1573.231, 'duration': 4.622}, {'end': 1580.293, 'text': 'So you cannot be dependent on the machine.', 'start': 1578.233, 'duration': 2.06}, {'end': 1587.475, 'text': 'And that is why, again, in order to complete space complexity, we will be using the Bigot notation again.', 'start': 1580.713, 'duration': 6.762}, {'end': 1590.969, 'text': 'So, Beagle notation is kind of very, very important.', 'start': 1588.868, 'duration': 2.101}, {'end': 1596.153, 'text': 'In all the interviews, Beagle in terms of time, Beagle in terms of the space.', 'start': 1591.45, 'duration': 4.703}], 'summary': 'Understanding memory space and space complexity using big o notation is crucial for program efficiency.', 'duration': 29.583, 'max_score': 1566.57, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1566570.jpg'}, {'end': 1672.818, 'src': 'heatmap', 'start': 1604.378, 'weight': 0.731, 'content': [{'end': 1608.441, 'text': 'So what is exactly the definition of space complexity?', 'start': 1604.378, 'duration': 4.063}, {'end': 1618.227, 'text': 'It is nothing but auxiliary space plus input space.', 'start': 1609.081, 'duration': 9.146}, {'end': 1621.659, 'text': 'What is auxiliary space??', 'start': 1620.438, 'duration': 1.221}, {'end': 1624.361, 'text': 'The space that you take to solve the problem?', 'start': 1622.439, 'duration': 1.922}, {'end': 1633.508, 'text': 'The space that you take to solve the problem.', 'start': 1625.822, 'duration': 7.686}, {'end': 1635.029, 'text': 'Input space.', 'start': 1634.288, 'duration': 0.741}, {'end': 1637.971, 'text': 'The space that you take to store the problem.', 'start': 1635.849, 'duration': 2.122}, {'end': 1643.275, 'text': 'Space that you take to.', 'start': 1641.153, 'duration': 2.122}, {'end': 1648.474, 'text': 'store the input, rather not the problem.', 'start': 1644.372, 'duration': 4.102}, {'end': 1655.537, 'text': "so let's give a very, very small example in order to explain what is auxiliary space and what is the input space.", 'start': 1648.474, 'duration': 7.063}, {'end': 1658.078, 'text': "so i'll write a very, very small thing.", 'start': 1655.537, 'duration': 2.541}, {'end': 1664.321, 'text': "imagine i'm taking an input of a and b in java you know how to take it and c plus plus, you know.", 'start': 1658.078, 'duration': 6.243}, {'end': 1667.142, 'text': "so i'm assuming i'm taking an input of a.", 'start': 1664.321, 'duration': 2.821}, {'end': 1672.818, 'text': "uh, So I'm not writing any syntax, because then it'll be C++ or Java specific.", 'start': 1667.142, 'duration': 5.676}], 'summary': 'Space complexity is defined as auxiliary space plus input space. a very small example is used to explain this concept.', 'duration': 68.44, 'max_score': 1604.378, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1604378.jpg'}, {'end': 1658.078, 'src': 'embed', 'start': 1625.822, 'weight': 1, 'content': [{'end': 1633.508, 'text': 'The space that you take to solve the problem.', 'start': 1625.822, 'duration': 7.686}, {'end': 1635.029, 'text': 'Input space.', 'start': 1634.288, 'duration': 0.741}, {'end': 1637.971, 'text': 'The space that you take to store the problem.', 'start': 1635.849, 'duration': 2.122}, {'end': 1643.275, 'text': 'Space that you take to.', 'start': 1641.153, 'duration': 2.122}, {'end': 1648.474, 'text': 'store the input, rather not the problem.', 'start': 1644.372, 'duration': 4.102}, {'end': 1655.537, 'text': "so let's give a very, very small example in order to explain what is auxiliary space and what is the input space.", 'start': 1648.474, 'duration': 7.063}, {'end': 1658.078, 'text': "so i'll write a very, very small thing.", 'start': 1655.537, 'duration': 2.541}], 'summary': 'Understanding the concept of input space and auxiliary space in problem-solving.', 'duration': 32.256, 'max_score': 1625.822, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1625822.jpg'}, {'end': 1767.956, 'src': 'heatmap', 'start': 1713.571, 'weight': 2, 'content': [{'end': 1717.293, 'text': 'What about the input space? This is one and this is one.', 'start': 1713.571, 'duration': 3.722}, {'end': 1720.674, 'text': 'So both of these can be referred as input space.', 'start': 1717.593, 'duration': 3.081}, {'end': 1723.996, 'text': 'Whereas this can be referred as auxiliary space.', 'start': 1721.055, 'duration': 2.941}, {'end': 1734.403, 'text': "And combined, I can say, This is the space complexity or I can say we go of three over here because you're using three different variables.", 'start': 1724.476, 'duration': 9.927}, {'end': 1736.184, 'text': 'You can convert them into bytes.', 'start': 1734.823, 'duration': 1.361}, {'end': 1738.366, 'text': "If you're taking an integer, you can convert them into bytes.", 'start': 1736.625, 'duration': 1.741}, {'end': 1739.767, 'text': 'I am not concerned about this.', 'start': 1738.546, 'duration': 1.221}, {'end': 1747.793, 'text': 'In an interview, you will have to say it in terms of we go of something, not in terms of bytes, KB, MB.', 'start': 1740.648, 'duration': 7.145}, {'end': 1758.385, 'text': "So for an example, If I define an array of size n, it means I'm consuming bigo of n size or n space complexity.", 'start': 1748.253, 'duration': 10.132}, {'end': 1767.956, 'text': 'So in an interview, if you are solving a problem which uses an array of size n, you say bigo of n is the space complexity that I am using.', 'start': 1758.805, 'duration': 9.151}], 'summary': 'Discussing space complexity in terms of big o notation and integer conversion to bytes.', 'duration': 54.385, 'max_score': 1713.571, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1713571.jpg'}, {'end': 1869.192, 'src': 'embed', 'start': 1837.275, 'weight': 3, 'content': [{'end': 1839.357, 'text': 'Because data should not be touched.', 'start': 1837.275, 'duration': 2.082}, {'end': 1850, 'text': 'you can do whatever you wish by taking the data, but you cannot do on the data because if you manipulate the data it has an issue,', 'start': 1840.273, 'duration': 9.727}, {'end': 1853.763, 'text': 'because in software engineering that data might be used in some other place.', 'start': 1850, 'duration': 3.763}, {'end': 1856.004, 'text': 'so never, ever, manipulate data.', 'start': 1853.763, 'duration': 2.241}, {'end': 1862.509, 'text': 'this might save you a bit of space, but the interviewer will end up rejecting you because this is a very, very bad practice.', 'start': 1856.004, 'duration': 6.505}, {'end': 1864.851, 'text': 'so never, ever do anything to the input given.', 'start': 1862.509, 'duration': 2.342}, {'end': 1869.192, 'text': 'always take extra variables, extra array, extra matrix.', 'start': 1865.271, 'duration': 3.921}], 'summary': 'Manipulating data can cause issues in software engineering. always use extra variables, arrays, or matrices instead.', 'duration': 31.917, 'max_score': 1837.275, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1837275.jpg'}], 'start': 1541.623, 'title': 'Space and time complexity', 'summary': 'Introduces time and space complexity, emphasizes computing them using big o notation, explains auxiliary and input space, and highlights the significance of not manipulating input data in software engineering interviews.', 'chapters': [{'end': 1687.403, 'start': 1541.623, 'title': 'Understanding time and space complexity', 'summary': 'Introduces the concept of time and space complexity, emphasizing the importance of understanding and computing them using big o notation, and provides a simple explanation of auxiliary and input space. it also highlights the significance of not relying on machine-dependent memory space.', 'duration': 145.78, 'highlights': ['The chapter emphasizes the importance of understanding and computing time and space complexity using Big O notation, stressing its significance in interviews and the need to avoid machine-dependent memory space.', 'It provides a simple explanation of auxiliary and input space, defining auxiliary space as the space taken to solve the problem and input space as the space taken to store the input, using a small example to illustrate.', 'It introduces the concept of space complexity as the memory space that a program takes, highlighting the variation in memory space across different machines and the need to use Big O notation to address this issue.']}, {'end': 1856.004, 'start': 1687.403, 'title': 'Space complexity in software engineering', 'summary': 'Discusses the concept of space complexity, explaining auxiliary and input space, and emphasizes the importance of not manipulating input data in software engineering interviews.', 'duration': 168.601, 'highlights': ['The space complexity is referred to as the auxiliary space and input space, with the total space complexity being O(3) due to the usage of three different variables.', 'In software engineering interviews, it is crucial to avoid manipulating input data, as it can lead to issues when the data is used in other parts of the software.', 'Using a third variable for storing the sum of two numbers, even though it takes lesser space, is not recommended in software engineering interviews due to the risk of data manipulation.', 'The importance of not manipulating input data in software engineering, as data should not be touched and may be used in other parts of the software.']}], 'duration': 314.381, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1541623.jpg', 'highlights': ['The chapter emphasizes the importance of understanding and computing time and space complexity using Big O notation, stressing its significance in interviews and the need to avoid machine-dependent memory space.', 'It provides a simple explanation of auxiliary and input space, defining auxiliary space as the space taken to solve the problem and input space as the space taken to store the input, using a small example to illustrate.', 'The space complexity is referred to as the auxiliary space and input space, with the total space complexity being O(3) due to the usage of three different variables.', 'In software engineering interviews, it is crucial to avoid manipulating input data, as it can lead to issues when the data is used in other parts of the software.']}, {'end': 2103.943, 'segs': [{'end': 1898.185, 'src': 'embed', 'start': 1856.004, 'weight': 0, 'content': [{'end': 1862.509, 'text': 'this might save you a bit of space, but the interviewer will end up rejecting you because this is a very, very bad practice.', 'start': 1856.004, 'duration': 6.505}, {'end': 1864.851, 'text': 'so never, ever do anything to the input given.', 'start': 1862.509, 'duration': 2.342}, {'end': 1869.192, 'text': 'always take extra variables, extra array, extra matrix.', 'start': 1865.271, 'duration': 3.921}, {'end': 1875.134, 'text': 'it might be tempting that if you use the same input variables you will end up taking lesser space.', 'start': 1869.192, 'duration': 5.942}, {'end': 1877.795, 'text': "but it's it's not a big concern.", 'start': 1875.134, 'duration': 2.661}, {'end': 1885.392, 'text': "if you're using b, go of n space, like If 2n is used by taking an extra array, it is okay.", 'start': 1877.795, 'duration': 7.597}, {'end': 1886.353, 'text': 'This is okay.', 'start': 1885.753, 'duration': 0.6}, {'end': 1890.638, 'text': 'No one is going to reject you if you are using bigof 2n instead of bigof n.', 'start': 1886.714, 'duration': 3.924}, {'end': 1894.621, 'text': 'If the interviewer specifically says, do it on the input, then you can use them.', 'start': 1890.638, 'duration': 3.983}, {'end': 1895.863, 'text': 'Otherwise, do not.', 'start': 1894.922, 'duration': 0.941}, {'end': 1897.464, 'text': 'And you can tell that to the interviewer.', 'start': 1896.263, 'duration': 1.201}, {'end': 1898.185, 'text': 'You can explain that.', 'start': 1897.484, 'duration': 0.701}], 'summary': "Always use extra variables, arrays, or matrices to optimize space, even if it's big o 2n instead of big o n.", 'duration': 42.181, 'max_score': 1856.004, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1856004.jpg'}, {'end': 1996.472, 'src': 'embed', 'start': 1969.451, 'weight': 1, 'content': [{'end': 1972.934, 'text': 'Take one second for roughly 10 to the power 8 operations.', 'start': 1969.451, 'duration': 3.483}, {'end': 1976.117, 'text': 'Might be 10 to the power 8 plus something, might be 10 to the power 8 minus something.', 'start': 1972.954, 'duration': 3.163}, {'end': 1983.242, 'text': 'But roughly it is 10 to the power 8 operations is what you can execute in one second on the server.', 'start': 1976.477, 'duration': 6.765}, {'end': 1986.045, 'text': 'Most of the servers are relatively the same.', 'start': 1983.723, 'duration': 2.322}, {'end': 1991.369, 'text': "And if they're saying two seconds, it doesn't mean 10 to the power 16.", 'start': 1986.625, 'duration': 4.744}, {'end': 1992.05, 'text': "it doesn't?", 'start': 1991.369, 'duration': 0.681}, {'end': 1992.85, 'text': "it doesn't?", 'start': 1992.05, 'duration': 0.8}, {'end': 1996.472, 'text': 'it means two into twenty operations.', 'start': 1992.85, 'duration': 3.622}], 'summary': 'One second allows roughly 10^8 operations on most servers.', 'duration': 27.021, 'max_score': 1969.451, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1969451.jpg'}, {'end': 2047.583, 'src': 'embed', 'start': 2014.503, 'weight': 3, 'content': [{'end': 2016.765, 'text': 'but the time limit given to you is one second.', 'start': 2014.503, 'duration': 2.262}, {'end': 2025.354, 'text': 'where you should analyze that the time complexity of your snippet of the code or your entire code should be roughly b.', 'start': 2017.81, 'duration': 7.544}, {'end': 2027.035, 'text': 'go of 10 to the power 8 operations.', 'start': 2025.354, 'duration': 1.681}, {'end': 2037.381, 'text': 'If in a coding round they are stating time limit 1 second, it means roughly, when you compute the time complexity of your code, avoiding constants,', 'start': 2027.696, 'duration': 9.685}, {'end': 2039.522, 'text': 'avoiding lower values, it should be b.', 'start': 2037.381, 'duration': 2.141}, {'end': 2041.884, 'text': 'go of 10 to the power 8 operations.', 'start': 2039.522, 'duration': 2.362}, {'end': 2047.583, 'text': 'So with this, I will be completing the step 1.1.', 'start': 2043.24, 'duration': 4.343}], 'summary': 'Code time complexity should be around 10^8 operations in 1 second.', 'duration': 33.08, 'max_score': 2014.503, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E2014503.jpg'}, {'end': 2103.943, 'src': 'embed', 'start': 2081.196, 'weight': 5, 'content': [{'end': 2085.297, 'text': "understood. if you're new to our channel, please please do consider subscribing to us.", 'start': 2081.196, 'duration': 4.101}, {'end': 2090.518, 'text': "If you haven't checked out Strivo's A to Z DSA course, the link will be in the description.", 'start': 2085.697, 'duration': 4.821}, {'end': 2093.699, 'text': 'And you get everything on the description, my LinkedIn, Instagram, Twitter, everything.', 'start': 2090.938, 'duration': 2.761}, {'end': 2096.241, 'text': 'You can follow me at any of these places.', 'start': 2093.94, 'duration': 2.301}, {'end': 2101.222, 'text': "And if you're learning online, you can always use the hashtag that is over here.", 'start': 2096.661, 'duration': 4.561}, {'end': 2103.123, 'text': "And with this, I'll be wrapping up this video.", 'start': 2101.602, 'duration': 1.521}, {'end': 2103.943, 'text': "Let's play some other video.", 'start': 2103.143, 'duration': 0.8}], 'summary': 'Encouraging new subscribers, promoting course, and sharing social media links.', 'duration': 22.747, 'max_score': 2081.196, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E2081196.jpg'}], 'start': 1856.004, 'title': 'Avoiding data modification and understanding space complexity', 'summary': 'Emphasizes the importance of not modifying input data in interviews and understanding space complexity, advocating for the use of extra variables or arrays, and advising to analyze code time complexity in relation to the given time limit of 1 second. it also discusses the importance of understanding server operations, highlighting that most servers take about 10^8 operations per second.', 'chapters': [{'end': 1898.185, 'start': 1856.004, 'title': 'Avoid modifying input data', 'summary': 'Emphasizes the importance of not modifying input data in interviews, advocating for the use of extra variables or arrays even if it requires more space, as it is a crucial practice to adhere to, with the suggestion of using big o notation to justify the use of additional space if necessary.', 'duration': 42.181, 'highlights': ['Always use extra variables, arrays, or matrices instead of modifying the input data, even if it requires more space, as it is a crucial interview practice. The rejection risk for modifying input data is very high.', 'Using big O notation, it is acceptable to use 2n space instead of n if it means using an extra array, and it is justifiable to explain this to the interviewer if necessary.', 'Emphasizing the importance of not modifying input data unless specifically instructed by the interviewer, and being prepared to explain this decision if required.']}, {'end': 2103.943, 'start': 1898.265, 'title': 'Space complexity and server operations', 'summary': 'Discusses space complexity and the importance of understanding server operations in competitive programming, emphasizing that most servers take about 10 to the power 8 operations per second and advising to analyze code time complexity in relation to the given time limit of 1 second.', 'duration': 205.678, 'highlights': ["Most servers take one second for roughly 10 to the power 8 operations, which is crucial to understand for competitive programming. Understanding the server's capability of executing 10 to the power 8 operations per second is essential for competitive programming.", "Analyzing code time complexity in relation to the given time limit of 1 second is emphasized, with the recommendation that the code's time complexity should be roughly b. go of 10 to the power 8 operations. Emphasizing the importance of analyzing code time complexity in relation to the given time limit of 1 second, advising it to be roughly b. go of 10 to the power 8 operations.", "Encouragement to drop a comment 'understood' at the end of the lecture to show understanding and motivation, and a call to subscribe to the channel and check out the A to Z DSA course. Encouraging viewers to drop a comment 'understood' at the end of the lecture for motivation, and to subscribe to the channel and check out the A to Z DSA course."]}], 'duration': 247.939, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/FPu9Uld7W-E/pics/FPu9Uld7W-E1856004.jpg', 'highlights': ['Always use extra variables, arrays, or matrices instead of modifying the input data, even if it requires more space, as it is a crucial interview practice. The rejection risk for modifying input data is very high.', "Most servers take one second for roughly 10 to the power 8 operations, which is crucial to understand for competitive programming. Understanding the server's capability of executing 10 to the power 8 operations per second is essential for competitive programming.", 'Using big O notation, it is acceptable to use 2n space instead of n if it means using an extra array, and it is justifiable to explain this to the interviewer if necessary.', "Analyzing code time complexity in relation to the given time limit of 1 second is emphasized, with the recommendation that the code's time complexity should be roughly b. go of 10 to the power 8 operations.", 'Emphasizing the importance of not modifying input data unless specifically instructed by the interviewer, and being prepared to explain this decision if required.', "Encouragement to drop a comment 'understood' at the end of the lecture for motivation, and to subscribe to the channel and check out the A to Z DSA course."]}], 'highlights': ['The lecture focuses on teaching the basics of time complexity, including its definition, computation, and related terms, preparing students for in-depth analysis of time complexity in problem-solving.', 'The instructor emphasizes that a thorough understanding of time complexity will be gained by completing all the steps or problems, providing a strong grasp on the topic.', 'The video will discuss time complexity in depth once students have learned complex codes, recursion, and backtracking, offering a comprehensive analysis of time complexity for advanced concepts.', 'The instructor mentions that the lecture will not cover time complexity for very complex codes initially, as students are not familiar with them, indicating a progressive approach to teaching time complexity.', 'Defining time complexity as the rate at which the time taken increases with respect to the input. The definition of time complexity is explained as the rate at which the time taken increases in relation to the input size, indicating the importance of understanding this concept in coding interviews.', 'Analyzing the time complexity and space complexity in every interview to judge the code. The speaker highlights that interviewers analyze the time complexity and space complexity of code in every interview to evaluate the performance, emphasizing the significance of these factors in coding assessments.', 'The instructor emphasizes that time taken is not equivalent to time complexity, providing an example of how the time taken for code execution can vary depending on the system and configuration.', 'The rate at which the time increases is generally referred to as time complexity, with the old Windows machine taking longer time for increasing input sizes compared to the new MacBook.', 'The importance of using big O notation in analyzing time complexity in coding interviews and examinations is emphasized.', 'Big O notation measures the number of steps in code, helping to avoid manually counting steps and emphasizing the importance of computing every step.', 'The chapter emphasizes computing time complexity in terms of worst case scenario, avoiding constants, and considering higher values, with an example of computing time complexity for a given piece of code.', 'The importance of computing time complexity in terms of worst case scenario is emphasized to ensure that the code can handle the maximum workload, with an example of best, worst, and average case scenarios provided for clarity.', 'The chapter explains the importance of avoiding constants in time complexity and provides an example of how adding a constant, such as 8, becomes insignificant when dealing with large input sizes, reinforcing the need to avoid considering constants in time complexity calculations.', 'Explanation of best case, worst case, and average case scenarios for analyzing time complexity is provided with a simple code snippet, illustrating the number of operations for different input values.', 'The chapter emphasizes the importance of learning time complexity for coding interviews, focusing on practical problem-solving abilities.', 'The time complexity of the nested for loop is determined to be n^2, as it runs for n times and then for n times again, totaling n^2 iterations.', 'The instructor prepares students for DSA coding rounds and emphasizes that they will be asked programming logic, not theoretical formulas, for big O notation and limits.', 'The chapter emphasizes the importance of understanding and computing time and space complexity using Big O notation, stressing its significance in interviews and the need to avoid machine-dependent memory space.', 'It provides a simple explanation of auxiliary and input space, defining auxiliary space as the space taken to solve the problem and input space as the space taken to store the input, using a small example to illustrate.', 'The space complexity is referred to as the auxiliary space and input space, with the total space complexity being O(3) due to the usage of three different variables.', 'In software engineering interviews, it is crucial to avoid manipulating input data, as it can lead to issues when the data is used in other parts of the software.', 'Always use extra variables, arrays, or matrices instead of modifying the input data, even if it requires more space, as it is a crucial interview practice. The rejection risk for modifying input data is very high.', "Most servers take one second for roughly 10 to the power 8 operations, which is crucial to understand for competitive programming. Understanding the server's capability of executing 10 to the power 8 operations per second is essential for competitive programming.", 'Using big O notation, it is acceptable to use 2n space instead of n if it means using an extra array, and it is justifiable to explain this to the interviewer if necessary.', "Analyzing code time complexity in relation to the given time limit of 1 second is emphasized, with the recommendation that the code's time complexity should be roughly b. go of 10 to the power 8 operations.", 'Emphasizing the importance of not modifying input data unless specifically instructed by the interviewer, and being prepared to explain this decision if required.']}