Clone Graph in Java

It is Friday morning and I am getting on Skype to chat with my best friend. We met when we were attending elementary school. We chat most Fridays but sometimes something comes up and we need to postpone for the following week. All friendships need care and time to maintain. The call occurs at 06:00 AM so hopefully I will have time to get this post done before the call.

The weekend is going to be the warmest of the year so far. We will be around 60F. Most people are going to use their grills or smokers. I believe we will join the group.

I received a message associated with a previous post. I will reply to it later today. The message suggests some improvements to my code. First of all I appreciate the message and suggestion. Please note that in general I want to get a solution up and running and accepted by the web site (e.g., HackerRank, LeetCode). If the solution is too slow, in general I try a second and in some occasions a third approach. I am not going to say that I have the best possible solution. I just want to make sure I describe my approach and you can see my thought process. Continue reading “Clone Graph in Java”

Implement Trie (Prefix Tree)

It is Wednesday morning and the cleaning crew is at our place making lots of noise. Typically they show up on Fridays but due to personal issues they requested to move the appointment. They do an excellent job. If you live in the Twin Cities of Minneapolis and St. Paul and are in need of a good cleaning service, please let me know. I will pass your information so you can get in touch with them or vice versa. I value privacy. Continue reading “Implement Trie (Prefix Tree)”

Encode and Decode TinyURL in Java

It is Sunday morning again. It seems that time is flying by faster than ever. Yesterday I worked all morning (about 6 hours). My daughter in law was going to visit her family and my son had to stay home. They were expecting a delivery and installation of a piece of exercising equipment. The delivery was scheduled between 03:00 PM and 06:00 PM.

Earlier that day I had made some pizza dough. I used to knit the dough by hand. In the past couple years I have switched to using our Kitchenaid mixer. I can take all the ingredients, mix them and put the dough to rise in about 25 minutes. I do it while chatting with my wife during breakfast. She just watches me switch tasks while having yogurt with homemade granola and warm milk with a triple espresso. We both like to drink coffee. Continue reading “Encode and Decode TinyURL in Java”