3213. Construct String with Minimum Cost (Leetcode Hard)
Вставка
- Опубліковано 5 лип 2024
- Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits!
Problem: leetcode.com/problems/constru...
Twitch: / larryny
Discord: / discord
Instagram: / larrysomewhere
#leetcode #coding #programming - Наука та технологія
Were you able to get the string here?
yes..was able to solve all 4 in 54 mins. Seeing improvement and that's good sign.
its feels good seeing you solve and explain at same time
...keep it up
Slick DP
lost on the TC
I tried this question for almost 50mins but got tle on some test cases...I was using memoization using maps
What is the 8 pointer prereq problem people are talking about?
Variations of this problem exists on Leetcode, this one is a funky one
@@Algorithmist My bad, I was thinking that '8 pointer' was a specific DP technique. I realize now the problem is worth 8 points which is why people are saying that.
Isn't it still O(N^2) from the DP part?
It is, this problem is full of issues
I posted solution with N*SQRT(N) with KMP + Trie + DP, but people says Aho-Corasick need to be used.
TLE
Useless
wtf u mean lol ?