I referenced this diagram (@ http://i.stack.imgur.com/2LtnD.png) instead for my implementation (which turns out to be WA) is there a way to reconcile the two? meaning how should I setup the for-loops to iterate the correct bounds as necessary to compute the final answer?
I edited my ans with link of my solution, see if it helps.
I have to agree. I think the tags are a bit off this time.
ChefSquare = easy, SeaStr = easy-med and Qstring - med (considering O(log n) per query)
alright, will take a look at it. thanks
Its in the medium section though @wittyceaser. So even if anybody practices heāll find it in medium!
Yup, I saw that but my intention was to address this issue on an overall basis and not just this problem.
your solution fails for this test case
1
abcde
aa
0 1 0
exp ans=0
your ans=-1
try returning 0 whenever value of a=0(there are definitely some cases regarding this as i was too stuck) since there is no need for further computation as deleting the entire first string and inserting the other would take 0 min operations
guys do some smart workā¦ instead of pasting your entire code ā¦ simply provide a link to your solutionā¦ it will be more friendly to othersā¦
Please update authorās solution
Please update authorās and testerās solutionā¦
waiting for authors solutionā¦
Waiting for authorās, setterās and editorialistās solution, DAY 201