## Range Sum of BST

Good morning! Yesterday my wife and I grilled some beef, made French fries in an iron pan in the grill and topped it off with some grilled asparagus. We spend the rest of the day making some profiteroles. We explored using a different flower in order for the pastry to not rise much (our oldest son prefers them that way), but the flavor changed. My wife is in charge of the pastry cream which she made. When all was set and done we delivered them to my son who lives in a different suburb of the Twin Cities of Minneapolis and St. Paul.

While driving back, my wife and I were talking about how the social life of people has changed since the COVID-19 pandemic started. We and most of the people when know, are taking care of themselves and others by following social distancing rules, wearing masks and gloves and lately even wearing goggles. We are very tired of the pandemic, but like most people, we need to continue to observer the rules until vaccines are approved and become available to all. Continue reading “Range Sum of BST”

## Power of Three

Today seems that it is turning into a beautiful summer Sunday in the Twin Cities of Minneapolis and St. Paul. The high temperature in the suburb where I live is forecasted to get up to 77 F and the day will be sunny. It is almost a carbon copy of yesterday.

My wife and I live in a suburb of the Twin Cities. This area has not been affected by protests from BLM (Black Lives Matter). As you know the last set of riots and lootings started in the city of Minneapolis when a black person dies while in police custody. At the time the mayor of Minneapolis and governor failed to provide basic security and law enforcement and for no reason, many businesses were looted and burned. Those were the facts a few months ago. Continue reading “Power of Three”

## Student Attendance Record I

Woke up today at 04:20 AM. It was raining. Spent some time reading and on this blog and at 06:00 time to make the donuts (actually breakfast).

Since I had not much time I did a search on LeetCode problems using the string “recursion”. Problem 551. Student Attendance Record I came up. I did not see the need to use recursion and the problem does not specify to use it either. Continue reading “Student Attendance Record I”

## Rectangle Overlap

There is some severe weather in the Texas area which should affect the Twin Cities of Minneapolis and St. Paul later today and tomorrow morning. Hopefully it will not be too bad.

On the local news members of the Black Lives Matter movement vandalized and looted several blocks of tall buildings in the down town of the Minneapolis business area. Not sure what was the point of the protests which just create problems for regular people that work and live in that area of the Twin Cities. This time around, the mayor of Minneapolis and the governor of Minnesota immediately called for the Minneapolis police, Minnesota State troopers, and National Guard to stop the vandals and looters. Will see how this sage develops in the next few days. Continue reading “Rectangle Overlap”

## Get Returned Type – Java

In general when you are developing software you need to have a good idea of the different classes that are needed and for each class the members and methods. Under some special circumstances you might run into classes that are not documented and you need to get some information as to the returned values. Please bear with me attempting to provide a good example. In practice most of the time (do not generalize) you will have such information displayed in your IDE or in documentation provided by the vendor. Continue reading “Get Returned Type – Java”

In this post I will reverse a linked list in Java. As I mentioned in a previous post, I am in the process of refreshing recursion using Java. In the next few days I will pick up a few more problems and post my approach.

In this post I will deal with 206. Reverse Linked List. If interested please take a look at the requirements for the problem and then give it a try before looking at solutions. Continue reading “Reverse Linked List”

## 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”

## Longest Univalue Path

I have a childhood best friend which we both attended K-12 in the same sequence of schools. We used to hang out on weekends and in some occasions would go out with the family. After high school we both went in different directions. We lost track of each other while attending college. A few years went by and we reconnected. Since then we have visited in person and our spouses appear to have connected well.

Through the years we kept in touch about once a month via Skype. Since the COVID-19 pandemic started, we talk once a week, typically on Friday. We are both morning people so we set the call time between 06:00 AM and 07:00 AM. This morning around 05:00 AM I received a message via Gmail that he had some work appointments early morning. We skipped the call but will reconnect next week. Continue reading “Longest Univalue Path”

## Lowest Common Ancestor of a Binary Tree

Things might be getting somewhat more complex with the COVID-19 pandemic that started in Wuhan, China. The CDC has been posting articles stating that individuals, who have recovered from COVID-19, may be prone to reinfection after three months. The theory of herd immunity, without a vaccine, goes out the door.

On a side note, people in the city of Wuhan, China have been celebrating that coronavirus is receding (there is no way to find out with data what is actually happening there) in their city with a massive water park party. The Chinese Communist Party does not seem to accept responsibility for the 800,000 deaths globally which they allowed to happen and are taking advantage of it in different ways. Continue reading “Lowest Common Ancestor of a Binary Tree”

## Lowest Common Ancestor in Binary Search Tree

It is a beautiful sunny summer day in the Twin Cities of Minneapolis and St. Paul. The high temperature for today in the city I live is forecasted to be 83 F. I prefer high temperatures in the range of 75 F to 80 F, but 83 F will have to do.

Yesterday I spent a few hours in front of my computers. My wife left early with a friend to go walking and shopping. My wife got back shortly after 11:00 AM. We made some potatoes with veggies in the grill using a cast iron pan. We always add some pepper, salt and a splash of oil with a high smoke point (i.e., avocado or peanut). Continue reading “Lowest Common Ancestor in Binary Search Tree”