Binary Tree – Heap

I read an article or two from Medium every day. A few days ago I read “Binary Trees: The Heap” by David Pynes. The idea behind a binary tree or heap is to be able to associate values with associated priorities. For example, assume you are in line at an emergency room in a hospital. When you arrive and register the facility may use a plain queue (FIFO) to wait for a physician. What happens if a patient in worse condition that you arrives later. The logical thing would be to allow them to see a physician before patients that are less ill. Continue reading “Binary Tree – Heap”

C++ Tidbits – Polymorphism

Good morning. It is a relatively cold Saturday in the Twin Cities. For some reason, this winter season has been warmer than usual with very little snow coverage. For example, today the high temperature will be around the freezing point. Some people (like me) like it while others hate it. There is no way to please everyone at once.

In an attempt to review in a systematic way some features of C++ I will be experimenting with polymorphism. In programming languages and type theory, polymorphism is the provision of a single interface to entities of different types or the use of a single symbol to represent multiple different types. To read more about it you may refer here.

Continue reading “C++ Tidbits – Polymorphism”

C++ Tidbits – Inheritance

I am about to complete a course on Neural Networks and Deep Learning. I am amazed at how one gets absorbed into the subject and language (in this case Python). Lately when I am working with C, C++, Java or Python I occasionally use a syntax from a different language.

In this post I will be covering / reviewing Inheritance using C++. Many years ago when I wanted to review C I would pull from my bookshelf the book “C Programming Language” by Brian Kernighan and Dennis Ritchie. During the years I have owned several copies. A few minutes ago I tried to locate my latest copy, but it seems that it grew legs and walked away. For C++ I have … (I guess I have also misplaced it) a book by Bjarne Stroustrup. Given the fact that I want a quick refresher, decided to go over an Advanced C++ Programming course by Mike McMillan. For this post (and a few more that I will write in the next few days) I am using this course as a guide and will be coding C++ on Visual Studio 2017 from Microsoft. Continue reading “C++ Tidbits – Inheritance”

Sub Strings

The end of year 2018 holiday season has come to a conclusion. This past year it seemed to be quite long. Probably because of the day in which Christmas and New Year landed. One way or the other, on Monday January 07, 2019 most people will be at work or at school.

As usual I spend some time every week taking a coding challenge. In my opinion they do little to determine if a person is capable of working as a software developer, group lead or system architect. Being able to come up with a good approach to solve a problem in an hour or so using tools you are not familiar with does not seem to be a logical approach to determine fitness for a company. The reason these challenges have become popular is due to the fact that they are encapsulated. You get a challenge, you complete it in the allotted time, and you should be able to solve any other problem. We humans are quite complex. Having excelled in school, sports, worked for a few companies and having owned my own, and studying every day for a couple hours, gives me a good insight on how and what needs to be done to achieve success in the software life cycle. Continue reading “Sub Strings”

Distance Between Nodes in a BST

I was looking at several articles on binary trees and thought it would be a good opportunity to write some Java code in order to refresh knowledge of binary trees, in particular with BSTs (Binary Search Trees). You never know what new things are out there.

I am not sure if most system architects and software developers run into the same situation as I do. I have learned and worked with many data structures and programming languages. I do not work with every single data structure often enough that I recall how to implement or use it as far as all the associated methods and functions. I have a reasonable understanding of most data structures and I can get back on the horse rather quickly. Continue reading “Distance Between Nodes in a BST”