Graph Search DFS and BFS

It is Sunday November 10, 2019 around 10:30 AM. As usual get up at 05:00 AM, prepare and have breakfast with my wife, shower, get dressed and go down to my home office for the first two-hour block of the day. I practice the Deep Work technique methodology by Cal Newport. I have been practicing the technique for years and it seems to work for me.

After the first block of the day I prepared tea and my wife and I sat down in the living room to chat. The high temperature yesterday was 44 F. The high for today is 30 and currently we are at 29. Taking in consideration wind, the wind chill is at 19 degrees. We were considering going out to Trader Joe’s to get some tea which we are running low, but we decided to have an early lunch and watch some movies this afternoon on Amazon Prime and Netflix. Continue reading “Graph Search DFS and BFS”

Re-Space

UPDATE – The format for the code for the class TrieNode has been addressed. Sorry for the inconvenience.

It is Friday and my youngest and family will be arriving this afternoon for a weekend long visit. My wife and I are getting ready for their arrival later today. We all enjoy good food so we have an extensive menu planned which includes fugazza, pasta carbonara with lots of pancetta, beef roast with a homemade tomato sauce, limoncello cake and different alcoholic and non-alcoholic beverages.

Let’s get to the main subject of this post. I tackled problem 17.13 from the Cracking the Coding Interview book. The problem is name Re-Space. Continue reading “Re-Space”

Majority Element

Last weekend my wife and I stopped to visit our son who also lives in the Twin Cities of Minneapolis and St. Paul. On our last trip to Europe, our granddaughters asked us if we could get for their dad a bottle of flavored vodka in the duty free store in the Schiphol airport in Amsterdam. At the time looked like a good idea. He seems to enjoy vodka. When we returned home the girls gave their dad the bottle. Continue reading “Majority Element”

Baby Names

Currently we live in a world of deception. The overflow of data that we are exposed to every day via news channels, companies and social media streams does not allow us to easily distinguish what is true, what is somewhat true and what are just plain lies.

I am not a political fanatic. Last week president Trump paid a visit to the Twin Cities of Minneapolis and St. Paul. He had a presentation at Target Center in downtown. My only thoughts were not to be in or around that area the day of the event. What was interesting is that some Tweets showed pictures of the event before it started while people were starting to arrive. The Tweets stated that very few people attended the event. This is a premeditated lie. I happen to know a couple people who attended the event and had pictures and videos. Target Center was packed. Continue reading “Baby Names”

Missing Number

It is Friday and it has been a long week and I am feeling somewhat tired. My wife and I have been invited for dinner at one of her brother’s house. I am looking forward to decompress later today.

In this post I tackled problem 17.4 from the Cracking the Coding Interview book by Gayle Laakmann McDowell. As usual I read the problem a few times to get a good understanding of what is required. Given that I have to generate the test scaffolding I try to be even more careful not to waste time. Continue reading “Missing Number”

Add without Plus

It is Thursday in the Twin Cities of Minneapolis and St. Paul and the sun is shining. Later this afternoon my wife and I will go walking for an hour. Not too many days left before it gets really cold and start to snow.

After doing the last HackerRank challenge which was rated easy I decided to go back to the “Cracking the Coding Interview” book by Gayle Laakmann McDowell and start tackling the hard problems listed in chapter 17 of the book. Continue reading “Add without Plus”

Breaking the Record

I am writing a white paper on Agile. Hope to get done by the end of this week. I will be looking where to start posting it and future ones besides this blog.

I received a message for an easy challenge from HackerRank. Just to warm up I decided to tackle it. If interest in the Breaking the Records challenge please take a look at the description and then go for it. Continue reading “Breaking the Record”

Plane Routes

This past week my wife, our granddaughters and I returned from a holiday trip to Europe. We visited several cities in Italy, Belgium and Amsterdam. We flew commercial airlines to move between large cities. This made me think of airplane routes and filling up the tanks with fuel. For efficiency reasons airplanes do not get refueled on each stop if it can be avoided. Depending on the part of the world you travel to, airplanes have minimum amounts of fuel they must have on board when they takeoff. The amount depends on the distance to the next stop. I know a few things about the subject because I flew for fun private planes for a few years. For personal reasons (wife and family) I decided to stop. Continue reading “Plane Routes”

Circular Queue Using Linked List

It is Saturday October 12, 2019 in the Twin Cities of Minneapolis and St. Paul and we are receiving the first snowfall of the season. Seems like a couple days ago the temperature dropped 50 degrees F in a single day in Colorado producing a big snow storm. We are getting the remnants of it.

I took some days off and traveled with friends and family to Europe. We visited Rome, Naples, Sicily, Bruges and Amsterdam. The temperatures in Italy were in the 80s, while the weather in Belgium and the Netherlands was in the 40s and rainy. We saw, ate and had a great time. That said; it is good to be back home. Continue reading “Circular Queue Using Linked List”

BST Operations

It is a Saturday morning in the Twin Cities of Minneapolis and St. Paul. It rained last night. Hopefully the day will be dry. I am planning on cooking chicken wings in the gas grill on the deck. There are not too many warm days left to use the grill this season.

A few days ago I started reading chapter four from “Cracking the Coding Interview” by Gayle Laakmann McDowell. For some reason I diverted to adding and deleting values from a BST. I always like to find how others approached the problem. I started watching some videos and reading some articles on the web. Several of the algorithms were convoluted and they seem to fail with different values. So I decided to write some code which seems to work as expected. If you give it a try and find issues please let me know. Continue reading “BST Operations”