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”

Shuffle an Array in Java

I have mentioned in recent posts that this year the temperature in the Twin Cities of Minneapolis and St. Paul has not dropped down to 0F yet. Well, that is changing this Sunday. It seems that the high temperature for the day will be -6F and the low -20F. The good news is that according to the forecast, the temperature will increase rapidly in the following days.

Last weekend I spend several hours on work stuff. Hopefully the following weekend will be a normal one. Not sure if my wife and I will be venturing out on the forecasted cold. Continue reading “Shuffle an Array in Java”

Shuffle the Array

This morning talking with one of my sons on Skype, I mentioned an article which I rewetted titled “China’s push to control Americans’ health care future”. My wife and I used to watch 60 Minutes every Sunday evening. About a couple years ago we stopped watching TV. It appeared to us that there was not much to watch. I liked the article. I agree with the points presented. To me the best part is the moneys offered to several states in the USA for a Chinese company to be allowed to offer COVID-19 services. My question is:  Where are the funds coming from? Stop for a moment and think about it… OK, now let’s move to a different subject.

Then the pandemic came. With it we started watching more content from Amazon Prime, Netflix and YouTube. In the past year it seems that two or three times Netflix has increased the price for their base tier by $1 each time. Yesterday I read the article “Why I’m canceling Netflix in 2021” which provides some reasons why you should be dropping Netflix. My wife and I seem to always watch YouTube and in addition Netflix or Amazon Prime. In these days we are favoring movies from Amazon Prime. They seem to have a larger and better selection and the service is part of Amazon Prime. Continue reading “Shuffle the Array”

Encode and Decode TinyURL in Java

It is Sunday morning again. It seems that time is flying by faster than ever. Yesterday I worked all morning (about 6 hours). My daughter in law was going to visit her family and my son had to stay home. They were expecting a delivery and installation of a piece of exercising equipment. The delivery was scheduled between 03:00 PM and 06:00 PM.

Earlier that day I had made some pizza dough. I used to knit the dough by hand. In the past couple years I have switched to using our Kitchenaid mixer. I can take all the ingredients, mix them and put the dough to rise in about 25 minutes. I do it while chatting with my wife during breakfast. She just watches me switch tasks while having yogurt with homemade granola and warm milk with a triple espresso. We both like to drink coffee. Continue reading “Encode and Decode TinyURL in Java”

Alien Dictionary

It is Thursday morning and it has been a long week at work. Apparently we have been experiencing lots of issues with our cloud platform. It seems that the storage server works fine when running on bare metal, but it experiences network related issues when running on virtual machines. We are currently looking at what might be causing the issues with the stack in VMs.

Before we start dealing with the problem at hand, I want to mention that I have a few books on algorithms. Like most people, I like to avoid spending money when I can get the same or similar results by doing a web search and reading the resulting material. I am a member of the ACM. I have access some of O’Reilly materials on-line. I believe both the books and videos have helped me locate quality information and are planning on continuing to use it. Continue reading “Alien Dictionary”

Verifying an Alien Dictionary

Running tests and verifying code is the work order for the day. I have a Command Line Interface (CLI) for the storage server sending the equivalent of ping requests but at the application level. Since I started the test at around 09:30 AM today it has processed so far 1,190,833 requests and associated responses without a single warning or error entry in the log files. I will stop the test at the end of the work day.

Earlier today I was going to work on a different LeetCode problem, but when I did a search on “alien” two problems were selected. Since one was flagged Easy and the second Hard, I thought some items might apply from the first one to the second problem. Hopefully it would not take too long to solve the Easy problem so I could tackle the Hard after the end of the workday. Boy was I mistaken. Continue reading “Verifying an Alien Dictionary”

Next Permutation

Good morning! It is an average winter Sunday morning in the Twin Cities of Minneapolis and St. Paul. In about an hour my wife and I will be heading out to go shopping for groceries at the St. Paul Trader Joe’s store.

Yesterday my wife and I made a couple Neapolitan pizzas that were quite close to the original ones. I am not going to go into the ingredients at this time. The technique resides in how the pizza is cooked. In general, in the USA we do not have pizza ovens in our backyards. A pizza brick oven heats up north of 600F which is not possible to achieve in a regular home oven. In addition, the initial transfer of heat, due to the size of the oven, is not possible. So, by reading and watching videos, we ended up with the following set of steps:

1. Preheat oven to 550F (takes about 15 minutes in our convection Thermador oven)
2. Add some olive oil to a large (14 to 15 inch cast iron pan)
3. Carefully place the dough on the cast iron pan
4. Turn on your largest gas burner on your range (we have a Viking with high heating capacity)
5. The first pizza will take about 7 minutes to cook (the following ones will take about 5)
6. Carefully move the pan into the oven
7. Finish cooking the pizza in about 7 to 8 minutes
8. Carefully remove the pan from the oven
9. Move the pizza from the pan to a tray and let it rest for 5 minutes (if you can)
10. Use a cutting wheel to cut 6 slices
11. Enjoy!!!

If you try this cooking technique, please share the experience with others. In general I enjoy reading and experimenting, not only with technical topics and subjects, but in general to improve on life. Continue reading “Next Permutation”

Halloween Party in Java

Today is January 21, 2021. Yesterday was the United States presidential inauguration. As you know I do not like politics. That said; I like facts so later when something does not seem right I will be able to make my own educated decision as to what the real reasons were for  the results we are observing. That said; I would invite you to find out about the executive orders signed yesterday by Joe Biden. Then put aside your political associations, and think what would the effects of the executive orders be for the future of the USA and for the citizens of the USA and the free and democratic world?

As I was generating this post I checked and the blog has exceeded the 6,000 followers mark!!! Thank you all for making this happen. Hopefully it is having some type of positive impact on your learning journey. Continue reading “Halloween Party in Java”

Merge Sort in Java

Today is January 20, 2021 and is the United States presidential inauguration. Not sure what to expect today or in the following days. Hope all goes well and we can move forward. I believe most of the people in our country are tired of reading and watching political news and propaganda.

Yesterday I attended an ACM webinar “Agent-Human Collaboration and Learning for Improving Human Satisfaction” by Sarit Kraus. She is a professor of computer science at the Bar-Ilan University in Israel.

What called my attention was the concept of having agents for both the automation and the human. I can easily see how that would work in a healthcare or a disaster scenario I do not see how that could work well with autonomous cars. I will go over the slides tomorrow and see if I missed something; otherwise I will send her a message. Hopefully she will have time to respond. Will let you know my findings. Continue reading “Merge Sort in Java”

Minimum Remove to Make Valid Parenthesis in Java

Good morning. Hope you are doing well and keeping safe. Not sure what is happening with the COVID-19 pandemic. In some parts of the world i.e., Peru, hospitals are full and people are dying out of control. On the other hand in Sicily, Italy most people are socializing and not wearing masks. In Israel the entire population is receiving the second shot of the COVID-19 vaccine.

Close to home, my wife and I continue to practice social distancing. On Sunday we had family members visiting. No one wore masks but we all kept at a distance from each other. Of course, we will not know if something happened for a couple weeks. Continue reading “Minimum Remove to Make Valid Parenthesis in Java”