Family Names

Yesterday my wife had an appointment at the hair salon. The gal that cut her hair commented that there were more people than usual complaining of seasonal allergies; some of them have never before experienced symptoms. My wife and I have some light allergies every season. Some days this year we have experienced strong symptoms. Hopefully things will get better soon.

Last evening in the local news, it was mentioned that due to the amount of water due to rain and melted snow, farmers are a couple weeks behind planting their crops. Having grains and vegetables is more important than experiencing allergy symptoms. Hopefully all will turn out well as the season progresses. The forecast for today calls for strong rain starting around mid morning and ending early tomorrow. Most of the rivers in this area are at or above normal flood levels. Hope the forecast falls short in moisture.

This week I had the opportunity to talk with a fellow software developer. We briefly discussed the approach of traversing a data structure using loops and recursion. It seems that if the number of objects is relatively small, recursion is elegant approach. That said, for large number of objects, recursion may fail due to execution stack limitations. Continue reading “Family Names”

Is this a Binary Search Tree

I took a look at the “Is This a Binary Search Tree?” challenge at HackerRank. If interested in learning about this challenge and associated requirements use the following URL:  https://www.hackerrank.com/challenges/ctci-is-binary-search-tree

The idea is quite simple. A BST should have all nodes in an ascending order when traversed using an in order traversal algorithm. If they do not, a value in a node is out of order rendering the tree as an invalid BST. Continue reading “Is this a Binary Search Tree”

AVL Tree

binary_search_treeYesterday I was looking at a problem on the HackerRank web site. The title is “Self Balancing Tree”. The challenge is to write the insert() function / method in such a way to insert new elements and keep the binary search tree balanced. As usual, no matter how familiar the subject might be, I always research the subject before planning a solution. By doing so I refresh my knowledge and in many cases learn one or more things.  To research I try to use Google research and go for Wikipedia articles.  Based on what I find I tend to go into different on-line articles or books. Continue reading “AVL Tree”