0

Did 2 leetcodes today. (will be more in future)

https://leetcode.com/problems/...

I remember I did something similar. The idea is that converting single letter to number, so sum2 - sum1 = the_added_letter

https://leetcode.com/problems/...

Don't know how to do it, so copy the answer. (I copy the answers most of the time) The idea is that on the same level, we sum the left or keep going down to left. For right, we just go down there. Little trick is that we use root.left.left or root.left.right.

Comments
  • 1
    From my point of view, reading and understanding the solutions is far from being enough to learn to solve problems. You will learn some tricks to do, see different approaches,etc But to really learn to solve problems you have to stubbornly fight them until you get them. Practice is the best teacher, be it to solve mathematical problems or coding problems.

    If you think the ones marked as "easy" in leetcode are still quite difficult to start with (i.e. if you have to look on the solutions for the easy problems in there), I recommend you using other websites that may have more variety of difficulties. For example, doing "A" problems in codeforces.com.

    And patience, if you don't put many ours on solving problems, I don't think it's probable to get good and efficient at solving them.
  • 0
    @drpen@DrPenguin I looked your profile and understand where you are coming from. I did read through how ppl do let code type question. 2 type, turtle (slow), fight to the end and get most out of it. Or rabbit (fast), if don't get it, read the answer, build up the volume. I did try the turtle. Some times it takes few days to do one, then the habit routine breaks. I won't do it any More. Now I am trying rabbit. Book atomic habit highlights the importantance of small win. I did try to solve it in 10 mins, if able to get through it will dig in. If not, need to build up the knowledge, then easier to do them.
Add Comment