Educative giveaway winners were contacted via email on May 2. You can also see a censored list of winners at the beginning of this stream kzbin.info/www/bejne/l3KnlHWur759b5Y
@shubhamtomar954 жыл бұрын
I like how talented, confident and yet humble errichto is! :)
@kaueluisoliveiradasilva94034 жыл бұрын
Best channel about coding! Please keep posting.
@bethsuni40114 жыл бұрын
6:24 this is King Crimson's ability. Errichto confirmed stand user.
@reiter21483 жыл бұрын
it's also exactly 10 seconds!
@williamwambua77104 жыл бұрын
Yeeeeehhhh Now Errichto has sponsors!!! Progress
@phillip48334 жыл бұрын
I hope you keep growing in your youtube career world and in your competitive coding career. Awesome you share your experience and problem solving skills with us.
@arkalykakash94754 жыл бұрын
Great explanation. Thank you Errichto!
@nowarm2 жыл бұрын
thank you so much Errichto for sharing your knowledge. I really enjoy thinking and learning with your explanation. It makes so much sense.
@nisharege8574 жыл бұрын
So what is better iterative or recursive? Best explanation!!!
@ClaudioBrogliato4 жыл бұрын
Damn, I started with the recursive approach but when I hit the time constraint I wasn't sure caching would be enough to pass and so I changed my mind and went iterative.
@cobrandrewg99954 жыл бұрын
Finally a sponsor😂
@hamzaxvz4 жыл бұрын
please keep posting videos like this, all the best..
@parthokunda4 жыл бұрын
Awesome video. Really loved your explanation.
@flamendless4 жыл бұрын
Awesome! Please explain the iterative solution with drawings.
@raahelbaig83474 жыл бұрын
I looked up the algorithm on Back to Back SWE. I couldn't solve it on my own. This question was my first cheat in the challenge.
@BedoEbied4 жыл бұрын
I gave up and didn't cheat I left it until I came back with some DP knowledge
@amanrubey2 жыл бұрын
My wish is to watch Errichto solve questions daily
@ankitacharya75203 жыл бұрын
So humble.
@rajsahu13864 жыл бұрын
please discuss the problem of minimum string coefficient of hackerrank hack the interview 2
@Expanses024 жыл бұрын
My recursive solution got TLE and iterative solution got accepted. Is there a significant difference in there execution time , since the complexity is same too ?
@charan7754 жыл бұрын
generally, iteration is faster recursion due to recursive call stack frames
@vishalvatsalya14394 жыл бұрын
Can you please do the Hack the Interview 2 problem explaination for the last questions? 😅
@amanrubey2 жыл бұрын
Insanely fast typing speed!!
@lovvyparhar3934 жыл бұрын
Instead of writing find and all we can use map.count(key) to know if the element is present in the map or not. I find it very useful.
@andreacodutti13134 жыл бұрын
But what if you want to modify the key? You would have to spend more time searching it again. (Or maybe the compiler can optimize and it would be the same thing)
@lovvyparhar3934 жыл бұрын
@@andreacodutti1313It is just a matter of convenience. Otherwise if you are in a time sensitive situation, and it is being called multiple times then you can consider the other option.
@audiogear44124 жыл бұрын
Keep posting more!
@ryukshinigami52164 жыл бұрын
General doubt : if I have a vector pair of int and string vector if I want to sort using direct stl sort function... It will sort using first value.... If first value is same for some two elements then it will sort according to lexicographical order of string but i want to sort according to first and then see if two elements of first are same then I want the first value which came first when I had push_backed and maintain the relative order what should I do?
@amandixit35553 жыл бұрын
can you please a playlist of good dp question explaing how to figure out reccursive function in dp questions
@emmanuellmiqueletti70293 жыл бұрын
I'm a Java programmer and love how C++ is flexible. this code wouldn't compile in java because he's returning in the first line of the method. C++ accepts but Java doesnt.
@CristhianR514 жыл бұрын
Hi Errichto, any particular reason to why you used a map instead of an int matrix when going for the recursive solution?
@AnthonyMata4 жыл бұрын
These vids are so handy
@TwoTeaTee4 жыл бұрын
Nice video! 👌🏼
@shubhamtomar954 жыл бұрын
VIDEO/SERIES REQUEST : solutions and explanations for problems in CodeJam Archives.
@mohammedshoaib16354 жыл бұрын
Petition for Errichto to pop his fingers for intro 🙌
@camper86504 жыл бұрын
Leetcode is very unpredictable
@vinaykataria59984 жыл бұрын
Standard dp problem 😊❤
@techesigncorp8694 жыл бұрын
hi Your videos are great .Thanks for making them .I have question actually can anyone do competitive programming as js developer .
@johnnashcz4 жыл бұрын
thinking of DP while programming can be distracting :D
@edwardsnowden95734 жыл бұрын
I started programming. But I can't focus on one curriculum. Different materials pop up unexpectedly. Show me a curriculum that I can follow
@charan7754 жыл бұрын
maybe follow codechef dsa syllabus. very good resource
@jin81284 жыл бұрын
hi EDWARD SNOWDEN how is it in Russia?
@edwardsnowden95734 жыл бұрын
@@jin8128 it is pretty good 😂
@emmanuellmiqueletti70293 жыл бұрын
any problem the interviewer give this guy. the interview probably will learn something hahaha
@utsavsingh8994 жыл бұрын
He doesn't pop his fingers no more🙁
@himanshugupta76474 жыл бұрын
@Errichto can we become good in 1 year
@sauravchirania57254 жыл бұрын
Nice videos! Why do you have a timer though? Having a timer when practising problems is understandable, but why have a timer when explaining the problem / solution to others?
@ZulfiqarTariqBurmi3 жыл бұрын
erric took some 19 minutes to solve it and he is one of the best competitive programmer so how can a company expect college graduates to solve it in 45 mins?
@SajidAli-fn9tp3 жыл бұрын
He could have solved it in a couple of minutes but he was explaining the intuition and thought process behind both the recursive and iterative version along with the coding. He has many years of competitive programming experience.
@jiaxinsun94444 жыл бұрын
I need two other of me to catch your thinking.
@audiogear44124 жыл бұрын
Plus blue yeti just sucks. Your voice is good.
@miteshkumar55574 жыл бұрын
There is a faster NlogN approach that people used. Why didnt you use that?
@waatup4 жыл бұрын
Let m and n denote the lengths of the two strings. Changing the problem into longest increasing subsequence does give you O(NlogN) but notice the N is not the length of the strings, but rather the dot product of the occurance count vector; for example, if a occurs 5 times in text1, and 3 times in text2, then a would contribute 5*3 = 15 to N. On average, you should still expect N to be O(mn), just with a much smaller constant because N is on average mn/(26^2). In practice that logN is never gonna outweigh 26^2, so converting to LIS is indeed advantageous for most cases. However, in the worst cases where the two strings are just two characters randomly alternating, like aabaababaabaa and ababaabaababaa, it ends up having a worse time complexity by a factor of roughly log(mn), while the space complexity is comparable. This can be mitigated somewhat with 1 additional comparison before doing the binary search, not sure how much it helps but probably by quite a bit.
@rentib91364 жыл бұрын
I hate dp and it seems leet code is planning on giving a lot of problems dp-related... Literally everything would be better, even geometry (I know its your favorite Errichto) or segment trees on graphs. Can you make a vide on changing LCS to LIS ?
@chaitanyakumar94554 жыл бұрын
how to do it in O(N*log(N)) time complexity ?
@waatup4 жыл бұрын
changing the problem into longest increasing subsequence does give you O(NlogN) but notice the N is not the length of the strings, but rather the dot product of the occurance count vector; for example, if a occurs 5 times in text1, and 3 times in text2, then a would contribute 5*3 = 15 to N. On average, you should still expect N to be O(mn), just with a much smaller constant because N is on average mn/(26^2). In practice that logN is never gonna outweigh 26^2, so converting to LIS is indeed advantageous for most cases, and the worst cases shouldn't be worse than the DP solution. The space complexity has a similar story.
@vivekksahu2714 жыл бұрын
@Errichto, Make your my_LCS() fn (in non-DP version) as private and see what happens. Your code wouldn't even be accepted.
@tonymok5354 жыл бұрын
I got TLE for recursive approach in python haha but iterative approach was accepted
@philtoa3344 жыл бұрын
Nice
@BedoEbied4 жыл бұрын
Sadly I don't know DP :'(
@user-mr-m123124 жыл бұрын
So learn it :) Errichto has free playlist about dp on this channel: kzbin.info/aero/PLl0KD3g-oDOGJUdmhFk19LaPgrfmAGQfo
@10xGarden4 жыл бұрын
I didn't know as well a month back, but its really blissful once you atleast learn it! Solve a few a problems from leetcode after Errichto's playlist
@BedoEbied4 жыл бұрын
gonna hit it up!
@whitesalmon09254 жыл бұрын
YES!!!
@annawilson38242 жыл бұрын
Dude for real, is this a home-debug video or for the whole youtube to see it? Hm ...
@SaltyWound4 жыл бұрын
I will report you for r@pe- -of my brain
@rohandalvi64763 жыл бұрын
I understood Nothing
@audiogear44124 жыл бұрын
The coding style is ugly as hell. Why not use lambdas for recursive functions instead of private member variables?
@c_tanki2074 жыл бұрын
did u think of the solution of last night in sleep(subconscious ) ?? if yes then like hehe