Find a Corresponding Node of a Binary Tree in a Clone of That Tree

It is past 06:00 PM CST in the Twin Cities of Minneapolis and St. Paul. I am quite tired and it is only Tuesday. Hope your week is going smoother than mine.

Earlier in the day I read the article “Let’s Not Dumb Down the History of Computer Science” by Donald E. Knuth, Len Shustek in Communications of the ACM, February 2021, Vol. 64 No. 2, Pages 33-35. If you have trouble accessing the article then you should be able to watch “Stanford Lecture: 2014 Kailath Lecture: Stanford Professor Donald Knuth” on YouTube.

In a nutshell Donald Knuth expresses the need for Computer Science history to be documented. Philosophically speaking I believe he is right on the point. Continue reading “Find a Corresponding Node of a Binary Tree in a Clone of That Tree”

Merge Two Binary Trees – Java

It is Monday morning. I got up earlier to finish the code and this post. Hope to be done before 06:00 AM. Today is my wife’s birthday. She is an evening person. Every morning I get up, fix breakfast, and then wake her up.

This year due to the COVID-19 pandemic (thanks China) we have not planned a celebration. Dates tend to shift by a day on non-leap years. Yesterday I received a message with Google photos that we took on yesterday’s date several years ago. Last year for her birthday we were with some family, friends in Rome, Italy. In the evening we all had a nice dinner and walked to the Fontana di Trevi and tossed three coins. That was a nice way to close the day. We like Italy and have been there many times. Perhaps next year things will be back to the new normal and will be able to celebrate once again in Rome. Continue reading “Merge Two Binary Trees – Java”

Maximum Width of a Binary Tree

This week has gone by so fast; at least it seems so. We have to take into account that Monday was Labor Day so most people, including myself, had the day off. Today is Friday and it is almost lunch time. I am done with a work task, so I decided to get this post done, have lunch and then start the next work task this afternoon.

There is a lot of code, but I generated a candidate for a solution that seemed to work but was too slow to be accepted by LeetCode. Let me elaborate on the specifics. Continue reading “Maximum Width of a Binary Tree”

All Possible Full Binary Trees

Labor Day weekend 2020 is here. The temperatures in the Twin Cities of Minneapolis and St. Paul are getting lower. Given COVID-19, the Minnesota State Fair has been postponed this year. My wife and I are not fair goers. We have been there twice. Our oldest son, who lives in this area, tends to go at least once a year.

Yesterday my wife and I grilled a whole chicken and some steak. There were chicken leftovers for the week. Not sure what we will grill for lunch today. Today the high temperature will be in the lower 80’s. It should be a great day to grill. Continue reading “All Possible Full Binary Trees”

Sum of Leaf Nodes

It is 11:20 AM CDT and the garage door repair technicians have not shown up yet. They mentioned they were going to be here first thing in the morning. The problem is that the door is jammed and we are not able to drive our vehicles. This will definitely be the last time we use this company. I will post the name of the company in a future blog after the door is fixed. We are planning on calling someone else if the technicians do not show up in the next 40 minutes or so.

Believe it or not, @ 11:30 AM a technician showed up with the board. A cracked board started the issue about three weeks ago. I spent some time helping him open the door to some extent. I was able to move a car out. We have some freedom at this time. If the technician needs some help he will let us know. We still have our SUV in the garage but cannot make it through the door yet. Continue reading “Sum of Leaf Nodes”