Backspace String Compare

It is a Saturday morning in the Twin Cities of Minneapolis and St. Paul. As we have been doing for a few months, my wife and I drove to the Costco store in Minneapolis, met with our son and went grocery shopping. Today we were not able to find Three Berry Blend bags. We got separate bags of strawberries and blueberries. Our son will stop later today at the Costco in Eagan. MN and will see if he is able to find a couple bags of mixed berries and a box of pens that we forgot while in Minneapolis.

This week I watched the Association for Computing Machinery (ACM) webinar “Lessons from COVID-19: Efficiency vs. Resilience” by Moshe Y. Vardi. It seems that the webinar is only accessible if you are an ACM member, which I am. I enjoyed the point he made of efficiency versus resilience not only at the software but also at the political level. At no point he mentioned politicians or political parties. In my opinion, it is a very good one-hour webinar worth your time. Continue reading “Backspace String Compare”

Reverse Only Letters

Definitely the weather is changing in the Twin Cities of Minneapolis and St. Paul. Last night my wife and I slept with a windows in the kitchen opened just a crack. This morning the upstairs temperature was at 69F. During winter we keep the upstairs at 68F. Chances are that this evening will sleep with the windows closed and the heater on.

I need to update my post previous post Count Negative Numbers in a Sorted Matrix. I made an incorrect statement and would like to generate an update. If you are curios, I left the body of the post as it was. I generated an opening note. Continue reading “Reverse Only Letters”

Masking Personal Information

Earlier this morning while having breakfast with my wife, around 06:30 AM she noted that the day was quite dark. I replied that this is normal this time of the year, especially because Daylight Savings in the United States was extended since the last update.

Around 07:00 AM, after showering and getting dressed, I descend to my home office. Around 10:00 AM I prepared coffee for my first break of the working day. It was sunny and windy with a temperature in the high 40’s. Hopefully the weather will remain like that for the rest of the day.

While browsing the LeetCode web site problem 831 Masking Personal Information called my attention. I develop software and systems that deal with medical records and images which need to be de-identified. This problem seemed to contain a very reduced set of data that needs to be anonymized. Continue reading “Masking Personal Information”

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”

Count Good Nodes in Binary Tree

Yesterday evening I was browsing different sites on my phone.

Found on Medium the article LeetCode 1448: Count Good Nodes in Binary Tree by Pierre-Marie Poitevin. If you follow my blog, you probably noticed that in the past couple weeks I have been looking at recursive problems on the LeetCode web site. So earlier today I decided to give it a try.

Originally I was going to write about load balancers today, but I am in the process of reading the paper: Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web by David Karger, Eric Lehman, Tom Leighton, Matthew Levine, Daniel Lewin, and Rina Panigrahy. As soon as I have time to finish reading it, I will generate a post on load balancers. Continue reading “Count Good Nodes in Binary Tree”

Number of Recent Calls

It is an ugly rainy and stormy day in the Twin Cities of Minneapolis and St. Paul.  It seems like the storms will resume around 03:00 PM later today. In general I shutdown all my desktop computers when there are thunderstorms. I have a couple UPS units but I have also invested time installing software and configuring them exactly the way I like it. Do not wish to change disks or re install software.

Earlier today I opened the LeetCode web site and selected the problems icon. In the search box I entered the word “recursion”. Many problems were listed. I sorted them by difficulty Easy to Difficult. I then selected problem 933. Number of Recent Calls. Time permitting, decided to tackle three problems in the three categories in the next few days. Continue reading “Number of Recent Calls”

Tree Preorder Traversal

Good morning! It is a sunny and warm Sunday morning in the Twin Cities of Minneapolis and St. Paul. Yesterday due to high temperature and humidity concerns, my wife and I decided to start lunch earlier than usual. We finished our mid morning cup of triple espresso around 11:00 AM.

My wife made some nachos. She used small tortilla chips, and a block of Colby-Jack cheese which she shredded in the Ninja blender. For the salsa she used one or two avocados, some jalapenos from a jar and some Pace picante medium strength sauce. The plain tortillas with the cheese were placed in a 350 F oven for about 20 minutes. That melted the cheese. Continue reading “Tree Preorder Traversal”

Using with in Python

It is Wednesday in the Twin Cities of Minneapolis and St. Paul. My wife and I spent most of the morning dealing with health insurance. Hopefully all will be done in the next few days. I am in the process of changing health insurance companies. Due to the COVID-19 pandemic everyone is using some type of video application to communicate. The proposed application was Zoom, but due to the security issues, we prefer using Jitsi. It did not take more than a minute to switch applications. It is interesting that video on Jitsi was working great but one of the participants decided to use our cell phones for voice because he did not have a camera or microphone on his computer. The cellular signals were not that great, but we managed. Continue reading “Using with in Python”

Contains Close Numbers

It is another COVID-19 (Wuhan virus) pandemic day. Seems like the stats for Minnesota and Dakota Country, the county I live in, are not increasing out of control. As a matter of fact they might be in a plateau. As we speak Minnesota has 34 total deaths which represents .001% of the population, and Dakota County continues to have 3 deaths which represents .001%. Best wishes that things are getting better where ever you are.

Italy is already talking about different ways to get people back to work. Hopefully they can do it in the near future. The United States will hopefully also get back to normal in a month or two. Failure to get the economy up and running will have very bad repercussions. Let’s continue to keep social distance and slow down new COVID-19 cases. Continue reading “Contains Close Numbers”