Merge K Sorted Arrays

Good morning! It is once again Saturday morning during the COVID-19 pandemic. Today is March 13, 2021 and the sun is shining in the Twin Cities of Minneapolis and St. Paul. The forecast calls for the temperature to get up to 58F. For this time of the year it is welcomed. Tomorrow it will be a little cooler and daylight savings time starts at 02:00 AM when the clocks spring forward to 03:00 AM. Tomorrow we lose one hour.

A week or so ago I was talking with an engineer about merging a set of sorted arrays. I also generated the post Merge Sorted Array which probably motivated the exchange. If you take a look at the last post, the idea was to merge two sorted arrays. The obvious next step is to consider multiple sorted arrays of the same or different lengths. In that post we considered two approaches. In the first one we add all the elements from both arrays into a priority queue. We then populate the result array with the elements being removed from the priority queue. Continue reading “Merge K Sorted Arrays”

Largest Triple Products – Revisited

Good morning! It is 04:15 AM and it is a relatively warm day. Last evening before going to bed I decided to hopefully get up a little earlier than usual. I have a permanent alarm on my phone for 06:00 AM. I use it as a fail-safe in case I do not naturally wake up before. Today I wanted to get this post done and take a look at a test I left running overnight. My wife has a doctor’s appointment early today and it is a 45 minute drive from home. She has to fast so I will follow suit. We should be leaving home around 06:45 AM. Continue reading “Largest Triple Products – Revisited”

Sort the Matrix Diagonally in Java

Good morning. It is Sunday again. I woke up around 05:00 AM and the outside temperature was -17 F. We are finally experiencing cold winter days in the Twin Cities of Minneapolis and St. Paul. An added bonus for football fans is that today is Super Bowl LV. My wife and I are not sports fans. We like to bike and walk and occasionally scuba dive. Up to a couple years ago we would watch the half time show. We so not watch TV any more. Perhaps we will find the half time show on YouTube. Continue reading “Sort the Matrix Diagonally in Java”

Revenue Milestones in Java

Good day ladies and gentlemen. Today is Wednesday January 06, 2021. The claims of electoral fraud in the 2020 presidential elections in the USA continue to be brought up. One way or the other January 20 is about two weeks away. If the claims do not pan out then on that day we will have a new president be sworn in. We will be able to read news without political opinions.

Earlier today my wife fixed a delicious chicken dish with a white sauce with lemon and capers. She served it with rice, baked potatoes and beats. For desert we had chocolate ice cream followed by a triple espresso. That marked the middle of my day. In the afternoon I finished two additional 2-hour blocks. Continue reading “Revenue Milestones in Java”

Magical Candy Bars in Java

Tomorrow we should be able to learn about the possible fraud in the 2020 United States presidential election. Hopefully the discussions and events will be peaceful from both sides. It will be interesting to learn what went on and how is it going to be addressed.

Yesterday evening for the first time my wife and I watched a president Trump rally. This one was in an airport in Georgia. Interesting facts were presented. What called my attention was a comment made by the president regarding how some election officials use what was labeled as “intent by the voter” to decide if the ballot was for Biden or Trump. The officials inspect the ballot and they decide on what was the “intent” of the voter was, and they assign the vote to the “intended” candidate. WHAT??? If the voter filled in the slot for Biden, then the vote goes to Biden, if the slot for Trump was filled in, then the vote goes to Trump. Finally if both slots were left empty, the vote does not count. THIS IS THE BEGINING AND END OF THE STORY. There is NO INTENT. A seven year old understand this. Try explaining the rules to your kid and they will understand there is NO NEED to determine THE INTENT OF THE VOTER! Continue reading “Magical Candy Bars in Java”

Largest Triple Products

Once again it is Friday during the COVID-19 pandemic. Not much to say due to the fact that outside work not much is changing. So far the COVID-19 vaccine development programs appear to be moving forward. Earlier this week UK started vaccinating people in nursing homes.

One of the sons of my best friend was married last year and moved to the UK. His wife and he had a baby boy about three months ago. My friend’s son, his spouse and newborn arrived earlier today for a month long visit. Hope they have a great time. Hopefully a month from now with the help of vaccines things will be getting better all over the world. Continue reading “Largest Triple Products”

Java Priority Queue

Yesterday was sunny and all the snow on our deck has melted away, so my wife and I decided to grill for the first time this season. I believe the temperature went up to 58 F. The day was not as warm as I would have liked, but on occasions I went out just wearing a t-shirt. We grilled homemade hamburgers, potatoes, and corn. We fixed on the stovetop mushrooms with onions and garlic. All was very good and as usual we made too much food. That is fine because we will just warm up leftover today. Continue reading “Java Priority Queue”