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”

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”

Smart Delay with Fibonacci

In the past few weeks I have been cleaning and optimizing some operations in a storage server. After running millions of operations I noticed an interesting condition and decided to use a different approach. Did a quick Internet search using Google Chrome for “smart delays” and nothing related seemed to come up. I thought using it for a title for this post would be fine. Continue reading “Smart Delay with Fibonacci”

Neo4j and Dijkstra’s SSSP

The workday is starting to wind down slowly. I have been doing some cosmetic changes and running tests on a medical storage server. No matter what you change you must always run tests to make sure all is well.

On my last post I covered Dijkstra’s algorithm for shortest path. Shortest path implies distance and not number of vertices traversed.

Continue reading “Neo4j and Dijkstra’s SSSP”

Graphs – Shortest Distance Paths

The motivation for this post is the Coursera class “Graph Analytics for Big Data” by the University of California San Diego I am currently taking. One of the algorithms that we briefly touched was shortest path between two nodes by Edsger Dijkstra.

The algorithm comes in different flavors. One can compute the shortest path between two nodes, the shortest paths between all nodes, among others. In this case I just went with the first approach. Continue reading “Graphs – Shortest Distance Paths”

Equal Stacks

While I was waiting for some tests to complete I checked my Gmail and found a message from HackerRank suggesting a challenge. The Equal Stacks challenge may be found under Practice > Data Structures > Stacks > Equal Stacks. I read the description for the problem and decided to tackle it using stacks; how creative of me. Continue reading “Equal Stacks”

Transform Strings

It is Sunday morning in the Twin Cities of Minneapolis and St. Paul. Woke up around 04:30 AM and spent the next couple hours working on Machine Learning with Big Data. It is a Coursera course. Have one more week to complete this course; so far so good. After preparing and having breakfast with my best half, return to my computer. Continue reading “Transform Strings”

Fibonacci Sequence

Lately I have not had the time to write in this blog. For the past several months I have been getting up seven days a week, no later than 04:30 AM. I am taking a specialization on Big Data and machine learning. Loving every minute but it does not leave time at the end of the day to sit down and do something in order to be able to write a post. Continue reading “Fibonacci Sequence”

More than a List of Words

When indexing text based word frequency / relevance which may be applicable for web searches, one of the procedures used is to create a term frequency (tf) array followed by an inverse document frequency (idf) one. You can read more about this here.

In a previous post I experimented with some text in order to build hashmaps with the words of sentences (to keep things in perspective for a blog post). In that post I used a string that I copied from a course I took some years ago. The sting was already preprocessed. The text had already been stripped off punctuation marks. Continue reading “More than a List of Words”