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”
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”
It is Sunday again, seems like last week came and went by faster than usual.
When I browse YouTube videos on my phone, I tend to run into some that I would like to watch and if possible experiment with the subject. This post is associated with a video by Irfan Baqui. It is nice to get a challenge, understand what it is required, solve it and see how a fellow developer comes to the same solution using a different and in some cases the same approach. Continue reading “Odd Occuring Number in Array”
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”
Yesterday I was talking with a coworker about the time it takes (me) to produce a post in this blog. Towards the end of the day, after a nice walk with my wife, I developed the code for this post. My inspiration came from a YouTube video by Irfan Baqui. I am a firm believer that in order to verify you understand some subject, you need to write about it. The reason for writing is that one explains the subject to the reader. Continue reading “Queue implemented with Stacks”
It is possible to receive a request, create a process or thread, service the request, and return to the caller the results of the operation. Many years ago, creating a process was the default approach. The issue was that creating and destroying a process when done are quite expensive operations. Continue reading “Thread Pool”
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”
This past winter was quite long but not too cold. A few weeks ago we received a one two punch with two winter storms. After that the temperatures went up and we had a day with temperatures in the mid 80s. In the past week the temperatures were down. Last night we were in the lower 40s. We turned off the central heating system at home for the season. We have already been using the air conditioner for a few days. This morning the inside temperature upstairs was 66 F. My home office is downstairs. The temperature has been at a solid 60 F so far. My wife and I are planning on going for a walk in a couple hours. Continue reading “Echo Server and Client”
In my previous post I mentioned that I was going to be spending some time experimenting with MongoDB. So why would I be dealing with MySQL at this time? Good question! The reason for it is that I want to store, among different things, Java objects in MongoDB. I am interested in comparing how the same Java object may be stored and retrieved using a SQL and a NoSQL databases. I could have used a different SQL database (e.g., SQL Server), but decided on MySQL. It happens that I have a few databases installed on my Windows 10 computer. With that out of the way; let’s experiment with MySQL. Continue reading “Running MySQL on Windows 10”
Based on an email message from HackerRank I decided to accept the Cavity Map challenge. The description for the challenge may be found using the following URL: https://www.hackerrank.com/challenges/cavity-map?utm_campaign=challenge-recommendation&utm_medium=email&utm_source=3-day-campaign
As usual, if interested please read the description and give it a try.
The Need Help link on the page discusses string basics. In this case I did not find the help of use. Continue reading “Cavity Map”