Sieve of Eratosthenes

It seems like my wife has a new doctor’s appointment towards the end of the day today. It has been a very hectic week. Hopefully we will be done with putting out fires soon. I enjoy waking up early morning and spending my time learning and working in two-hour blocks. Typically I get in 5 blocks on workdays and 2 to 3 on weekend days.

A few days ago I was solved a HackerRank challenge which dealt with prime numbers. I wrote a post but did not go into too many details. The approach I used was based on the Sieve of Eratosthenes. Continue reading “Sieve of Eratosthenes”

Prime Checker

UPDATED I mentioned in a previous post that I experienced some water problems in my home office after the water meter was replaced at home. The contractor who did the update stopped by yesterday afternoon with a powerful fan to help the small amount of water that had leaked into my office dry up. This morning the humidity from the carpet was gone. He also mentioned that they will replace the four books that got damaged by water. I will call this afternoon to return the fan and inform them of the four books.

I randomly selected the Prime Checker challenge at HackerRank. Read the requirements and spent time working on a solution. When I was ready to give it a try, noticed that it would not allow me to enter my solution. In addition, it seems that the scaffolding code has an issue and a message indicates that you need to address it. Not sure what is going on. I had to skip it because I am not able to enter my code. Continue reading “Prime Checker”

Code Complexity

Code complexity is a subject that is taught early on in Computer Science curricula. Not sure if early is the reason why many software developers tend to forget what it is and how to apply it.

Last week a group of developers were talking about the complexity of algorithms and Big O Notation came up. As a matter of fact when considering complexity there are:

Theta notation
Big O notation
Omega notation

Continue reading “Code Complexity”