Complexity Analysis: Time Complexity: O(n^3), where n is the length of the string. This complexity arises due to the nested loops that check all possible partitions and transitions within the string. Space Complexity: O(n^2), as we are using a 2D DP array to store the minimum number of operations required for each substring.
Apologies for the confusion earlier! The time complexity of this approach is O(n), especially in the case of prime numbers where n iterations are required. Thanks for your understanding!
Thank you for your feedback! The music is just for the problem statement reading part, but we'll consider adjusting it or removing it to better suit faster playback speeds.
Time complexity: O(log base 10 (n)), n is the number of chunks(batches) Space Complexity: O(1), Ignoring the space used for storing result. And couple of more stringbuilders and string arrays
Please note, when using stable_sort in C++, be aware that while the algorithm typically operates at O(n * log n) under optimal conditions with sufficient memory, it can degrade to O(n * log^2(n)) if memory is limited.
We apologize for the oversight. The time complexity is O(nlogn) instead of O(n) due to the use of inbuilt sorting. Regards, Mayur Programming Club (MPC) 😊
Hi Viewers, Apologies for the confusion. In the provided example, please consider 1 as a local minima. We hope this clarification does not affect your understanding of the logic and approach. Best regards, MPC (Mayur Programming Club) 🖥🔍
Wow. It was a great explanation. For the first 5 minutes I could not really follow you. Maybe think if you can become little bit clearer on the mask part and why you using it. Overall totally worth of 11 minutes. Thank you!
Thank you for your explanation. As a tip, your microphone seems to be clipping a lot. Maybe adjusting your microphone level and/or hoe close you are to it can help. Maybe it is caused by the microphone itself though.
I used prior knowledge of XOR operations. And being able to apply some knowledge comes with practice. I have explained the thought process in video also.
There were some issues with audio quality today due to a technical glitch. They will be resolved in upcoming videos. We apologized for the inconvenience caused.
Sir, logic building improves with practice. It is the only way. Apart from that practicing smartly is the key. Let's say this was the problem that you were not able to solve own your own. Then what you can do is see what concepts are being used in solution and try to learn and practice them so that next time a similar pattern problems occurs your chances of solving it are more than what currently are.
Just a feedback: The explaination is good! what I wanted you to improve that if you are saying something and then taking time to write the same thing makes the video slow and boring which will make people disinterested. So maybe try avoiding or finding an alternate approach to it. Otherwise thanx for explaining:)
Your approach is very satisfying 😄explaining every small chunk of code and concept associated with it is really helpful for a beginner like me Thanks!!
14:55 If I'm understanding this correctly, the condition in line 13 is checking if indx is an index outside of the current available indices in the vector lis. Meaning len is the same as lis.end() which will always be increasing the subsequence? EDIT: I replaced line 13 with this "if (lower_bound(lis.begin(), lis.end(), num) == lis.end())" and it seemed to work the same, so I believe my reasoning is correct. Thank you for the solution.