Move Zeroes

It is Sunday October 31, 2021 and you are correct, it is Halloween. Woke up as usual just before 06:00 AM. The temperature outside was 39F and the inside temperature was 66F. It all started nine days ago when I noticed that the furnace was not generating heat. This morning the second company that my wife and I selected for the job showed up with a brand new furnace. The two technicians in a pickup truck towing a closed trailer set sheets on the floor in the lower level from the door to the utility room.

In less than a couple hours the furnace was removed and loaded in the trailer. When they were hailing in the new furnace, two more technicians showed up to help. It seems that the job will be done in about four hours. I was impressed with the quality of job, courtesy and attention to detail.

If you live in the Twin Cities of Minneapolis and St. Paul area and have an issue with your furnace of AC units, leave me a message and I will pass on the name of the company.

As I am getting ready to publish this post the furnace crew is finishing testing the installation of the furnace and is starting to put the furniture back in place. I was expecting that the job would take about six hours, but due to the additional number of technicians the job should be completed in less than five hours!!! Continue reading “Move Zeroes”

Rotate Array

It is Friday and a week since the problem with our furnace showed up. We have switched service companies. We are now going to replace the furnace. Have not heard from the technician yet. Hope to have the new unit installed earlier next week. The temperature in the Twin Cities of Minneapolis and St. Paul is slowly going down.

Due to the COVID pandemic, I stopped donating blood to the Red Cross. For the past decade or so, I have been giving blood twice a year. I do it once for my wife and the second for me. Not sure if we will ever be in need of blood, but I am aware that it is constantly needed. My next appointment is towards the beginning of November. Continue reading “Rotate Array”

Squares of a Sorted Array

Today has been a very busy and stressful day. This morning when I woke up around 06:00 AM I could hear the second zone in the heating system running. That zone includes the lower level at home. While having breakfast it bothered me that the output of the furnace was still sending heat to the second zone. I went down and noticed that the furnace was not working properly. We had an issue last Friday which was fixed Monday afternoon. Apparently the issue was not properly addressed.

I asked my wife to call the company that worked on the furnace. They could not send us a technician today so she called a different company. Hopefully the technician will stop by this afternoon. It is shortly past 05:00 PM and the furnace technician has not arrived. I guess he will be here tomorrow. The good news is that we can keep the house quite warm using the lower level fireplace.

This morning while doing some on-line research, I ran into the  Documentation OData 4.0 Java Library. Apache Olingo is a Java library that implements the Open Data Protocol (OData). Apache Olingo serves client and server aspects of OData. It currently supports OData 2.0 and will soon support OData 4.0. The latter is the OASIS version of the protocol: OASIS Open Data Protocol (OData) TC. Planning on experimenting with it in the next few days.

Since a week ago I have been writing this post on Google Docs. When done I save a copy in .docx format on a Windows machine. I used to write posts using Word. Continue reading “Squares of a Sorted Array”

Search Insert Position


Good day. It is Wednesday and it feels like winter is just around the corner in the Twin Cities of Minneapolis and St. Paul.

Earlier today I attended an O’Reilly webinar. The subject was not as interesting as I thought. What called my attention was the fact that I had to download and install the RingCentral app. After the webinar was done I removed the app from my computer. For security reasons, I prefer to keep installed only the apps that I frequently use and download the ones that I seldom use when needed.

The app seems to be easy to use. I checked RingCentral on Wikipedia. The company is traded in NYSE and the company was founded in 1999. In 2019 their revenue was 902.8 million USD. Looks like the founders figured out there was an opportunity to profit during the COVID pandemic, and they offer a good product.

Out of curiosity, I looked up Zoom Video Communications on Wikipedia. I did not know that it was founded in 2011, long before the COVID pandemic. In 2021 their revenue was 2.7 billion USD. Zoom is another app that I install on my computer when needed.

Over the weekend visiting my younger son, the subject of personality types came up. My daughter in law sent me a few links. I have been reading them on and off. Will have more to say about my findings in my next post. Continue reading “Search Insert Position”

First Bad Version

As I mentioned in my last post, over the past weekend my wife and I visited my younger son who lives in Madison, Wisconsin. At some point during a conversation personality types came up. We spent an hour or so on the subject. Towards the end my son’s wife mentioned an article on the subject she found by doing a web search. I asked her to send us the link. She did. I will read the article later today and will comment on my next post.

The technician that was going to fix the issue with our furnace showed up on time. I decided to watch him at work. He opened the furnace and cleared some dead wasps that had come in through the air intake tube. The furnace started to work. He spent some additional time cleaning contacts to increase the current flow.

It seems that our furnace is getting to the point that it will be needing a replacement soon. The technician gave us quotes for three different models. If the furnace continues to operate as intended we would be replacing it towards the end of Spring 2022.

Last night the furnace worked as expected. This morning I increased the temperature setting to the lower level. I li9ke to keep my office at 65F. The rest of the house is set to 68F during winter.

As I am typing this post the “Machine Learning for Algorithm Design” by Maria-Florina Balcan ACM webinar is starting. I will continue with this post as soon as I am done attending the 1-hour event.

OK, I am back. Would like to finish this post before lunch time. Continue reading “First Bad Version”

Binary Search Iterative

Good day! It is another sunny Monday in the Twin Cities of Minneapolis and St. Paul. Had a rather busy weekend. My wife and I visited our youngest son who lives in Madison, WI. Drove last Friday afternoon and returned yesterday. The drive is about 3 ½ hours each way. Traffic was fine in both directions. This time of the year is nice because it is cold enough that bugs do not hit the windshield and warm enough that there are no slippery ice spots on the roads.

It is nice to visit family. My wife and I try to connect with our booth sons every day for a few minutes. We use FaceTime, Jitsi and occasionally just the phone. That said; nothing beats in person visits. I agree that with the COVID pandemic we have gotten used to converse on-line, but technology has ways to go in order to match in person communications.

Last Friday, I woke up around 03:00 AM and noticed that the furnace was running but the incoming air was not warm enough. After some investigation I was able to determine that the furnace was not heating. I assumed that the pilot might be off. I would rather not deal with it, so my wife called for service. They told her that due to the cold weather on Friday they were booked. Since the temperature was not going to dip during the next week or so, it would make sense to have a technician stop by on Monday (that is today). We have an appointment between noon and 03:00 PM CDT. In addition, we would not have to delay our departure on Friday and we will be back late on Sunday.

On our return home, the inside temperature was around 64F. I started the living room fireplace and the ceiling fan. When we were ready to go to sleep, the upstairs temperature was at 72F. Perfect for sleeping on a fall night. Clicked on the remote and the fireplace turned off. The built-in fan continues to circulate air for about 2o-25 minutes after being shut down.

This morning I woke up around 05:30 AM and turned on the upstairs fireplace and the ceiling fan. After breakfast I shut it down and turned on the lower level fireplace and ceiling fan. My office is downstairs. After showering and getting dressed I went down to a nice and toasty office. I decided to turn off the fireplace. Continue reading “Binary Search Iterative”

Best Time to Buy and Sell Stock with Cooldown

Good morning! Hope your day has started well. As expected for this season, days are getting cooler. That said we have not experienced freezing temperatures (< 32 F) in the Twin Cities area of Minneapolis and St. Paul yet. The forecast for tomorrow calls for a low of 30 F. In the near future we will find out if the forecast is accurate.

Yesterday it rained on and off most of the day. Around noon we had some thunderstorms and later in the afternoon it repeated. As you might already know, I tend to shutdown all computers at home during thunderstorms. I had lost a few pieces of computer equipment before I set a policy of turning off computer equipment when the weather is acting up. Yesterday, after shutting down my main computer, I decided to install the Uninterruptible Power Supply that I purchased a month or so ago. It took me about 15 minutes moving, cleaning, installing, and verifying the operation of the UPS.

I continue to read the book Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and The Cloud by Paul Deitel and watching the on-line video Python Fundamentals by the same author. I am experimenting with exercises from the course and book. I have to admit that one of the best ways to learn is to read and experiment.

I am also looking for dynamic programming problems and attempting to apply the contents of the article Dynamic programming is simple by omgitspavel. After this post which is catalogued as a dynamic programming, will attempt to solve a set of programs from LeetCode starting with some rated Easy and moving up to the ones rated Hard. I will try covering 15 problems in the next few days. Continue reading “Best Time to Buy and Sell Stock with Cooldown”

Best Time to Buy and Sell Stock II

It is a relatively nice day in the Twin Cities of Minneapolis and St. Paul.

This weekend my wife and I will go to visit our younger son. His house is about three hours by car. It does not make sense to fly. It will take longer than driving when you consider the overhead at the airports.

I continue giving it a try to the process to solve dynamic problems using some simple steps as described in the paper Dynamic programming is simple by omgitspavel. Each time I give it a try I add additional guidance.

The main problem that I see with the approach is that one still has to read, understand and explore other methods before diving into dynamic programming. The problem we will be solving in this post can be resolved faster and better not using dynamic programming. Continue reading “Best Time to Buy and Sell Stock II”

Best Time to Buy and Sell Stock with Transaction Fee

Good morning! Hope you had a great weekend. The weekend was not too exiting for my wife and me. We did replenish our freezers for the next few months. I believe we have enough supplies to last us through a good part of spring 2022.

We decided to cook some ribs in the oven. We have done this several times, but due to the fact that my wife is not too fond of such delicacy we have not cooked them in about three years. I pulled the ribs from one of the freezers and put it in a refrigerator for three days. On Friday evening I took them out of the fridge and they were still partly frozen.

On Saturday morning after breakfast I rubbed some salt and pepper on the ribs. Like I mentioned, she is not too fond of ribs or BBQ sauce. I wanted to add some that we got at Trader Joe’s a couple weeks ago. I ended using the sauce on my dish. My wife used an Asian sauce which went very well with ribs. We also bought that sauce at Trader Joe’s.

I was going to set the oven at no more than 300F, but my wife suggested 325F to get them done faster. The ribs went in around 07:00 AM. After showering and getting dressed, I went down to my office for a 2-hour block.

Later that morning my wife and I sat down for a cup of triple espresso. We chatted and decided to get a couple items at a specialty grocery store in St. Paul. We turned off the oven and headed out. In retrospect, we should have removed the ribs from the oven. We had lunch around 01:00 PM and the ribs got a little dry for my taste. We had them with brown rice and black beans. We both enjoyed them, but once a year is enough. The taste is very unique like turkey. We have turkey on Thanksgiving Day and perhaps Christmas. I guess most people do the same in this part of the country.

On a separate note, I ran into the article Was Our Universe Created in a Laboratory? by Avi Loeb published on Scientific American on October 15, 2021. The article starts with the word “Opinion” which puts it into perspective.

I am not going to get into the implications of the ideas in the article. My parents taught me never to discuss religion, money or sex. Such subjects are very opinionated and it is hard to get a general consensus. That said; here we are talking about the article. The reason for me to bring it up is due to the fact that for the past three decades or more, when my wife and I talk in private, I have described to her the idea of multiple universes generated by beings more advanced than us. In such universes there are some actual beings and many artifacts. The idea behind is to study scenarios that in general fall outside our comprehension and interests.

I have to tell you that as soon as I read the article, I ran to my wife to tell her about it. We both thought it was very interesting.

In my thoughts and opinion, the article does not exclude a superior being that is above all levels. It just puts such being above the more advanced civilization(s) that at this point are able to generate universes.

I will try to contact the author of the article and let him know that I really enjoyed reading it. After an hour or so of sending my message to the author, I received a reply. Thanks. Continue reading “Best Time to Buy and Sell Stock with Transaction Fee”

Split Array Largest Sum

Hope you are doing well on this Friday. This morning my wife and I woke up with outside temperatures in the low 40’s F. I closed the window in the kitchen, set the thermostats to 68 F and started the furnace. This was the first time this season. The furnace ran for a few minutes heating downstairs. The rest of the day we warmed up with the oven and the sun that shined on and off. Beside next Monday and Tuesday that the high temperature will be in the low 70’s F, the high temperatures will be in the low 50’s and 60’s.

My wife woke up not feeling well. It seems that something she ate yesterday did not go well with her. As far as we can tell, both had the same meals. I am feeling well as usual. We were planning on getting a few grocery items this afternoon. We decided to go tomorrow instead.

This morning we spoke with our younger son. It seems that the plans for them visiting us next week have been scrapped. Hopefully we will have an opportunity in the near future to get together.

Spoke with my best friend earlier today. He got back home last Sunday. He was visiting her daughter in Canada. All is well with his family. His wife will be spending a couple more weeks and will return home after her daughter’s birthday. He had to get back earlier this week due to his work schedule. Continue reading “Split Array Largest Sum”