BASIC CALCULATOR III | LEETCODE # 772 | PYTHON SOLUTION
Vložit
- čas přidán 10. 05. 2022
- In this video we are solving an absolutely dreadful question: Basic Calculator III (Leetcode # 772).
This question is quite terrible and very confusing to solve. The other basic calculators were manageable but this one is just extra and takes it to a whole other level. We can solve it in a very similar way but we still need to be careful here as there's some annoying cases we need to make note of now that we can have parenthesis and multiplication/divison. - Věda a technologie
Great solution! It's the most clean one I've seen. Implementing DFS using stack is definitely a pain lol
My Meta phone screen is tomorrow and I think I found a video for every Meta question I ran into (except for maybe 1 that I can't remember).. Just wanted to say thanks again for the hard work man. I'll be recommending this channel to everyone I see prepping for Meta and hopefully I'll pass to the onsite and get more utility out of it.
Thanks for the kind words and best of luck with the phone screen. I'm sure you'll smash it!
Thanks man I passed!@@crackfaang Now it's time to check out your System Design playlist :)
how was it? Mine was supposed to be tomorrow and its now gotten rescheduled lol. I'm watching this channel too! But still nervous...
@@aman4434it went well! I heard that I passed the next day.
If you’ve done the top meta questions, and get a good interviewer, then it should be a breeze! Just make sure to communicate your ideas and have a good understanding of the solution you’ve chosen.
It went well! I was a bit nervous for a second but my interviewer was amazing. She calmed me down and told me to just let my thoughts out. Once I did that I got back on track and everything went smoothly! Heard back the next morning that I passed!
As long as you have the majority of the medium/easy top 100 meta questions complete then I'm sure you'll do fine! Good luck :)@@aman4434
great explanation
Good job on your videos. Could you please do this one next? 1267. Count Servers that Communicate. I would really appreciate to hear your explanations
Thanks for the kind words and your support. I’ll add that question to my work queue and make sure you subscribe so you don’t miss the upload
in line 34, if op=s[i], will it become ")" ???
yes but it's fine because if the string still has more after ")", the following MUST be a new OP, like 2*(...)/3 from the examples. And when we process the "/" after, which will first call helper with op being ")", which will do nothing. Then business as usual, num back to 0 and op set to "/"