Efficient Graph Search

It is a spring Monday in the Twin Cities of Minneapolis and St. Paul. The weather forecast calls for humid and overcast day with the possibility of thunderstorms this afternoon. In general, I try to shutdown my computers at home as soon as I hear thunder. So far all is good. Hopefully the storms will start later in the day after my workday is over!

The weekend was rather nice. It was humid and warm. It seems that the weather has changed more than usual this year. In Lima Peru, there are no storms or any considerable rain. Apparently earlier today some lightning and associate thunder passed by the coastal city. As far as I know this is a first. Continue reading “Efficient Graph Search”

Movies on Flight

Good day! It is a Friday in the month of May. The forecast called for rain and thunderstorms. We only received some rain. It is good to have some rain because things were starting to dry up. When vegetation dries up it may catch on fire.

In this post I will attempt to solve two flavors of the same problem. I believe one can create a few more problems by changing just a few words in the requirement. This will become clear as we read the requirements and describe the differences.

I found this problem named Movies on Flight in the LeetCode web site. Apparently Amazon has been using different versions on some of their technical assessments. Continue reading “Movies on Flight”

Sam and Substrings

It is a sunny Tuesday in the Twin Cities of Minneapolis and St. Paul. The earlier forecast was calling for thunderstorms. I just check the revised forecast and it seems that we might have some rain after dark. That is good news because my wife and I are invited to our oldest son’s house today to have the next version of the burgers we had last Saturday as I commented on the Roads and Libraries post. Will let you know tomorrow how it goes.

As I mentioned in a previous post, a few weeks ago I had elective surgery performed on my left knee. All is going very well with the recovery process. So far most of the physical therapy sessions have been on Tuesdays and Thursdays towards the end of the day (04:30 PM or 05:00 PM). Today the session is at 01:30 PM. My wife changed our daily lunch schedule to accommodate it. We will be having lunch after therapy.

Yesterday we spoke over Skype with a couple friends of us that live in Peru. Things are not going well in Peru or Latin America in general. Seems that communism is creeping at alarming rates. In the next presidential elections to be held on June 06, 2021 there are two candidates. One candidate represents the right and the other the left. The left has mandated voters in different places to take a picture of their secret ballot to allow party representatives to verify that the votes are for the communist candidate. If voters refuse their lives would be in danger. Not much to say about a secret and fair election!

Of course the bottom line is always money. In this case some foreign nations will benefit by getting several mines at a much discounted price. It seems like a repeat of what transpired and is still going on in Venezuela. Such is life. Continue reading “Sam and Substrings”

Roads and Libraries

Good morning! It is a foggy Sunday morning in the Twin Cities of Minneapolis and St. Paul. In the past week or so the mornings have been sunny. That said, the forecasted high for the day is 76F. If the fog clears and with sun shine we might be a couple degrees warmer.

Yesterday the high temperature was forecasted to be 70F. My wife and I stopped by our older son place. He lives in Lakeville which is about 15 minutes away by car from our place.

We spent a few hours outside chatting and drinking a couple adult drinks while he was cooking some delicious burgers. He enjoys grilling and smoking meats. In the past couple weeks he decided to meet or better yet, improve on a butter burger sandwich from Culver’s.

I am not going to get into the details but in my opinion the burgers he made were a notch better than the ones from the food chain. That said, my wife and I would have cooked them no more than one minute per side. My son likes burgers very well done while we prefer them just done. He did not only cook the burgers, but in addition served them with all the trimmings and in waxed paper in the shape of a bag. We all had a good time. Today my wife and I will grill steaks but next week, we will do burgers with all the trimmings. We will be skipping the paper bag! Continue reading “Roads and Libraries”

Search in Rotated Sorted Array

It is another nice day in the Twin Cities of Minneapolis and St. Paul. The temperature will be in the low 70s. I noticed in the Weather Channel app on my phone that a warning of brush fires has been issued in this area. Based on the temperatures above than normal and precipitation below normal, it was going to happen sooner or later. Hope we get some needed rain soon.

On a separate note the relationship between Israel and Palestine has taken a wrong turn. The last administration in the US was moving forward and had achieved peace between the parties. With the current administration thousands of rockets has been launched into Israel. Interesting but about 20% of the rockets launched have killed the terrorists that launched them. Hopefully both sides will be able to get to a new agreement. Continue reading “Search in Rotated Sorted Array”

Generate Parentheses

For lunch my wife made a pork and cauliflower dish. She added a few drops of Green Dragon Hot Sauce. It goes very well with pork dishes. For desert we had gypsy arm filled in with dulce de leche with strawberries on the side. Lunch was quite good. After chatting for a few and doing the dishes and pots I got back to my home office. Continue reading “Generate Parentheses”

Symmetric Tree

Good morning gals and guys! Hope you day has started on the right note. Today in the Twin Cities of Minneapolis and St. Paul we are expecting a high temperature of 67F and the day is sunny. Starting today the two-week forecast shows high temperatures in the upper 60’s to mid to lower 70’s. All looks nice, but we are somewhat low on precipitation. From my backyard I can see a small pond with very low water levels. Hopefully farmers are receiving enough rain to have a good crop this fall.

This morning I watched a session from AWS Summit Online. The session is named “Amazon DynamoDB: Untold stories of databases in a serverless world” by Angela Timofte. She is a data platform manager with Trustpilot. What called my attention were a set of points she brought up which illustrates how important is to allow your technical staff to experiment, learn and make mistakes. Such approach has helped the company move from MySQL to MongoDB and currently to DynamoDB. What is more important, the company currently uses about ten different database engines to store different types of data. They are using the right tools for the jobs (one size does not fit all). If you get a chance take a look at the 22 minute presentation here. Continue reading “Symmetric Tree”

Merge two Sorted Lists

It seems that the CDC has approved the use of the Pfizer vaccine on 12-16 year old’s. Hopefully most of them will be vaccinated soon. We need to get close to 95% in order to achieve herd immunity and dramatically reduce the chances of new mutations.

While looking at a list in LeetCode, I decided to go after problem 21 Merge Two Sorted Lists. Keep in mind that you do not want to memorize the solution for a large set of problems. You want to develop a sense / intuition on how to approach different type of problems. Continue reading “Merge two Sorted Lists”

Wildcard Matching

It has been a few days since my last post. Busy with work and family items. The weather in the Twin Cities of Minneapolis and St. Paul has been quite pleasant. The temperature has been at or slightly above average. On the other hand precipitation seems to be below average. Hopefully this pattern will not disrupt farmer’s production.

I had selected a couple articles for brief discussion in this post. I did not bookmark one of them and I am having a hard time finding it. In a nutshell the articled had to do with Pfizer, their COVID-19 vaccine and India being able to mass-produce it. In the USA we have the concept of a patent. It is a great idea that helps the rightful owner of an idea to freely market and sell their invention for a period of time. If not mistaken the period is seven years. I fully agree with such concept. It is fair and invention needs to be rewarded to motivate progress.

Like any other subject, there are always two sides to the same coin. Biden has proposed to ban all COVID-19 patents to help the world win the battle against it. Good for public relations, but would such approach work? My opinion is no. In the USA alone there are about 30% of the people that have and will refuse a COVID-19 vaccine. That said, we will not achieve herd immunity. I have relatives and friends in different countries. Some are very interested in getting a vaccine. Some have traveled to the USA at a high expense, spent a month here, and received the two doses of the Pfizer vaccine. Some have no desire in getting vaccinated at all. The main reasons are the lack of effectiveness (most vaccines provide 100% protection) and side effects (you can possibly get ill after receiving the vaccine). Not sure how effective is the Pfizer vaccine, but it is not 100%. Regarding the side effects, the COVID-19 vaccines administered in the USA seem to not cause side effects. You cannot say the same for the two Chinese vaccines with are about 70% effective and have shown a large number of people getting very ill with side effects. Hopefully the numbers are rapidly improving with time.

I received a link to the post “18 Reasons I Won’t Be Getting a COVID Vaccine” by Christian Elliot. Some of the points are hard to ignore and our government should act on them. On the other side big Pharma lawyers and lobbyist will make change hard to achieve.

BTW, my wife and I have received the two Pfizer doses. The same holds true for the family of one of our sons. The other is still thinking about it.

The other news that called my interest comes from Yale University. The article “DODD: Sit down, be humble” by Ethan Dodd. Perhaps the article is too political, but politics seem to be something we are all familiar with.

What called my attention was the acceptance that no one has all the answers. That is especially true at work. People have different backgrounds and experiences. That is what diversity means to me. Color of skin, religious believes, and gender as examples, is not what makes people diverse. We are diverse because of our unique experiences. Of course, as the article states, pretending you have all the answers is not beneficial in any company, relationship or society. Keep that in mind the next time you are working on a project. Continue reading “Wildcard Matching”

Find Minimum in Rotated Sorted Array

It seems we are having another nice spring day in the Twin Cities of Minneapolis and St. Paul. The sun is shining and the temperature is forecasted to reach the low 60s. On Saturday we are expecting high in the low 80s. That will be a record day. Will see when it arrives.

My wife and I are planning on grilling on Saturday and Sunday. For one reason and the other we have not enjoyed an “adult beverage” in a couple months. Grilling steaks while having a beer or two on a sunny and warm day is something worthwhile to do on a weekend. Will provide more info on Sunday if I am able to complete a problem and post it. Continue reading “Find Minimum in Rotated Sorted Array”