Continuous Subarray Sum

Tomorrow is Thanksgiving Day 2020. My wife finished preparing three containers with cheesy potatoes casserole. She has been making this dish as far as I can remember. Due to the ingredients we tend to have it once or twice a day. I will provide the recipe and some pictures on tomorrows post. If I am not able to solve a problem and generate a post, will generate a post as soon as possible.

We are still in the midst of the COVID-19 pandemic. About two million people around the world have die of complications related to the novel coronavirus. My wife and I have some friends’ originally from Vietnam. We learned today that one of them is in the hospital and the other barely making it at home. One of my wife’s brothers has been diagnosed with COVID-19. He, his wife and two kids are in quarantine at home. Our best wishes and our thoughts go out to them for a quick and safe recovery. Continue reading “Continuous Subarray Sum”

Validate Binary Search Tree

It is a gloomy day in the Twin Cities of Minneapolis and St. Paul. The good thing is that we have about two days until Thanksgiving Day 2020. This year we are cooking an 11 lbs. turkey. Typically my wife and I make an 18+ lbs. bird. Not only that but we are dropping half of it at our granddaughters place. On Thanksgiving Day we will be connecting with family via Jitsi and Skype. Continue reading “Validate Binary Search Tree”

Construct Binary Search Tree from Pre Order Traversal

It is Thanksgiving Week 2020 and we do not have a winner in the 2020 Presidential Elections yet. The amount of fraud in this year’s elections has been unprecedented. My comment has nothing to do with politics. It is just based on common sense for individuals 12 years of age and older. I have friends and relatives living in different parts of the world. Their confidence and respect in the USA is almost (never generalize) gone.

On multiple occasions and referring to different topics, I have mentioned in this blog a technique used when people want to understand the positions of each other. First both argue on behalf of their own positions. Then, and this is the key of the technique, they switch positions and argue in favor of the opposite position. It is amazing what you can learn about different ideas when you use this technique. The reason for this tends to be based on facts and logic. Continue reading “Construct Binary Search Tree from Pre Order Traversal”

Print Immutable Linked List in Reverse

Hi gals and guys. Hope you are doing well during the COVID-19 pandemic. It seems that most of us are somewhat tired following the basic rules that reduce the spread of the coronavirus. By relaxing the rules in the past few months, the numbers of COVID-19 infections, in most cities worldwide, are going up. Note that the issue is the number of infections, not the number of deaths. Infected people may need hospital services. If the number of patients is larger than the capacity like it was when this thing started, then we have a problem. At this point in time, people with most infections per 1,000, is people in college age. Please follow the rules! We all benefit from it. Continue reading “Print Immutable Linked List in Reverse”

Maximum Length of a Concatenated String with Unique Characters

Hello and hope you are doing well. Today the temperature went up to 51F in the Twin Cities of Minneapolis and St. Paul. I did not get a chance to go out. Hopefully we will experience a mild winter this year.

Sorry but it is the middle of the week (hump day) and I do not have much to tell you. Time appears to be passing quite fast. Many cities in the country are upping COVID-19 restrictions. It is going to be an interesting Thanksgiving Day coming up in about a week. My wife and I will be preparing a meal. Will take some to our family and on our way back will get on-line (Jitsi or Skype) and will enjoy the meal. Continue reading “Maximum Length of a Concatenated String with Unique Characters”

First Web Application – Node.js

Hope you are having a nice day. Today is Tuesday. Unless I am mistaken, it has been three weeks since Election Day and as far as I know the results for the presidential election are still up in the air. Hopefully we will find out the results in the next few days.

Next week is Thanksgiving Day. My wife and I were planning on having very few people over, but after further deliberations, we decided that we will skip and celebrate Thanksgiving 2021 with family and friends. Based on what is going on with COVID-19, it seems that a few vaccines will be made available early next year. By November 2021 we expect that most things would be back to normal; that is, the new normal. Continue reading “First Web Application – Node.js”

Simple and Second Web Servers in Node.js

I am about to call it a day. It is dark and cold (25 F) in the Twin Cities of Minneapolis and St. Paul. I am in my office attempting to finish this post while my wife is upstairs in the living room wrapped in a blanket. Tomorrow morning we will wake up to a balmy 12 F. What else can I say?

I am reading and experimenting with the content of the book “Get Programming with Node.js” by Jonathan Wexler. I am currently on page 55. Expect to be done with towards the end of next month. At that time I will switch to experiment with Deno. Then I will move on to generate and post a first pass of a storage server. It should be a lot of fun. Continue reading “Simple and Second Web Servers in Node.js”

Java Functional Programming – 2 of n

Today I woke up a little earlier than usual. I have my alarm set for 06:00 AM, but I was up around 04:45 AM. Read for a while, prepared breakfast and woke up my wife. After breakfast showered and was in my home office by 06:00 AM. I typically work in 2-hour blocks. Break for about 15 minutes and then repeat. For lunch I break for about an hour depending if I need to help my wife with lunch. Typically I help grilling on the deck, but the temperature has dropped and there is snow so I think there will be no more outdoor cooking until next spring.

I have a lot of things planned for the workday. Hopefully I will be able to get most of them done by 06:00 PM. Continue reading “Java Functional Programming – 2 of n”

Java Functional Programming – 1 of n

It is not a nice day in the Twin Cities of Minneapolis and St. Paul. It has been raining and snowing on and off all day. I assume the roads are somewhat slippery. The good thing is that we do not have to go anywhere this evening.

One of my goals is to continue learning and experimenting with Java. Experience has taught me that at work one tends to use a limited feature set of the programming language(s) you use. This is why on my own time I like to learn different programming languages and different features so when I design and develop software, I can be quite productive.

We all know that not all languages have the same syntax or features, but with time, most object oriented languages tend to add similar features (not to say the same) with a different name and syntax. That is why I also like to solve problems that require algorithms. Once you have the idea, it does not take too much to implement the algorithm in a different language. This seems to be the trend while developing microservices. The idea is to use the best language for a task. Continue reading “Java Functional Programming – 1 of n”

Java Streams and LocalDate

It is Monday November 09, 2020 and it has been a week since the Election Day and the tally of votes is still being adjusted. What a disaster for the USA and friends.

I am not sure why we are not using a voter ID card and limiting voting in person at the polls on Election Day. No exceptions! I am not implying the obvious, but the changes made to the electoral system this year was an open invitation for fraud. Not sure which part of our government is responsible for making sure elections are legal and trustworthy.

If you disagree with the voter ID card and a secure electronic vote at polling sites I would like to provide you with some facts (not opinions) which seem to be all over the news and social media. When you get a credit card via USPS, for your protection, you are asked to call a toll free number and answer a few questions which would allow the credit company to enable the card so you can start charging on it. Credit card companies / banks do not trust the USPS with money. Continue reading “Java Streams and LocalDate”