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”

Add Two Numbers – Revisited

It is Wednesday morning in the Twin Cities of Minneapolis and St. Paul. The temperature should go up to 60F. The forecast for this Saturday calls for 80F. It seems that Saturday will be a great day for grilling some steaks. Our freezers at home are currently full with chicken and pork. The mix changes during the short summer months when we tend to favor beef. My wife suggested for us to stop by Costco in Minneapolis Saturday to see which beef cuts are available. We ill just get enough for the day. Continue reading “Add Two Numbers – Revisited”

Linked Lists – Part IV

Hope you had a nice weekend. Over the weekend and for preparation to start the design and implementation of the DoubleLinkList class I started updating the test code for the LinkedLists test class. The current code builds a crude list taking into account the pre and next members of the Node class.

Following is a screen capture of the console for Visual Studio 2013 when executing a partially commented out test: Continue reading “Linked Lists – Part IV”