Remove Linked List Elements

linked_listLogged into LeetCode and had the site automatically select a challenge for me. It selected Remove Linked List Elements (https://leetcode.com/problems/remove-linked-list-elements/).

Please visit the LeetCode web site to get the description of the challenge. This challenge has a difficulty level set as easy. Continue reading “Remove Linked List Elements”

Sort Times – Part III

algorithms_fourhe_edition_deluxeAs I have mentioned before, I am going over the Algorithms fourth edition book by Robert Sedgewick and Kevin Wayne with the purpose of refreshing concepts and always learning something new. In this entry I cover my observations when using Quicksort which is one of the most popular and better performing sorting algorithms.

Before continuing reading this entry, please take a look at Sort Times – Part II. In particular take into consideration the comments in italics. Continue reading “Sort Times – Part III”

Waiter

hackerrank_logoI enjoy coding challenges. It makes me think outside my daily work routine. Last weekend I received the following email message from HackerRank:

Hi John,

Improve your skills with this challenge recommended for you:

Waiter

Data Structures | 2,031 submissions

Print the correct order of plates.

Solve Challenge

Happy coding,

The HackerRank team

Continue reading “Waiter”

Sort Times – Part II

timsortIn the Sort Times (now labeled Sort Times – Part I) post I showed code that produced results that needed some additional thoughts. I requested and obtained comments from an author and professor at an Ivy League school (now using names because I have not received a written authorization to do so). Professor, thanks for your insights and thoughts. Continue reading “Sort Times – Part II”

Simple Text Editor

thanksgiving_dayHope you had a nice Thanksgiving Day and today you are enjoying Black Friday shopping.

Logged on to HackerRank and selected the Simple Text Editor challenge. To get a description please visit their site at: https://www.hackerrank.com/challenges/simple-text-editor Continue reading “Simple Text Editor”

Sort Times – Part I

sort_comparisonIn the past few weeks I have been reading and experimenting with code and exercises found in the Algorithms fourth edition book by Robert Sedgewick and Kevin Wayne. It is always a good idea for any professional in any field to refresh concepts and learn new things. In my case I am a Senior System Architect for a company in the West Coast so I constantly polish my skills in Computer Science. Hope physicians do the same thing with medical books ;o)

Many software developers tend to grab library methods to get different tasks accomplished. That makes sense. That said; it is a good idea to go back and review if the code is as optimal as needed. In my case I am comparing the performance of different sorting algorithms. If interested get a copy of Algorithms and take it for a spin. Continue reading “Sort Times – Part I”

Largest Rectangle – Part 2

daveed_vandevoordeI received a message regarding the Largest Rectangle – Part 1 post. It seems that like in many other blogs and posts, I failed to properly describe the algorithm. It seems that I was just describing the implementation. Sorry about that. Thanks for the comment xxx (will not disclose names unless explicitly indicated in email messages). I will attempt to address my mistake in this new post. Continue reading “Largest Rectangle – Part 2”

Largest Rectangle – Part 1

histogramOn and off, during the past couple days I spent time soling the Largest Rectangle challenged form HackerRank (https://www.hackerrank.com/challenges/largest-rectangle). The challenge is described as follows:

“There are N buildings in a certain two-dimensional landscape. Each building has a height given by h in [1 : N]. If you join K adjacent buildings, they will form a solid rectangle of area K * min(h, … , h). Given N buildings, find the greatest such solid area formed by consecutive buildings”. Continue reading “Largest Rectangle – Part 1”

Why Apache Cassandra?

cassandra_logoThe following question came up a couple weeks ago: Why would I use Apache Cassandra? First of all let’s get a definition for Apache Cassandra. Edited from Wikipedia (https://en.wikipedia.org/wiki/Apache_Cassandra):

“Apache Cassandra is a free and open-source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Cassandra offers robust support for clusters spanning multiple datacenters, with asynchronous master less replication allowing low latency operations for all clients. Continue reading “Why Apache Cassandra?”