It is Sunday in the Twin Cities of Minneapolis and St. Paul and it is starting to snow. The forecast calls for snow turning into rain. Later this morning my wife and I are going to the Mall of America (MOA) for a walk. It beats getting on exercise equipment at home and watching TV.
I selected the Funny String practice from HackerRank. Given a string one has to reverse the characters and place them in a second string. Then traverse both comparing the absolute differences among consecutive characters. If the differences match then the function should return the string “Funny”; otherwise it should return “Not Funny”. Continue reading “Funny String”
My wife is out with a friend shopping. She is expected back around 11:00 AM. At that time will start preparing lunch.
I took a look at the next Hacker Rank challenge for strings in Java. If interested you may find the description here.
Continue reading “Gemstones”
Good morning. It is a cold morning in the Twin Cities of Minneapolis and St. Paul. When I got up around 04:00 AM the temperature was around -1F. I believe it will rise during the day.
My wife left with our neighbor shopping. They should be back around noon. We are planning on making some ravioli from scratch. On workdays my wife cooks, but on weekends we both do. Have some red wine from last week which we did not finish. It should be a nice and cozy lunch. Continue reading “HackerRank in a String”
Earlier this morning I took a look at the Strong Password challenge in HackerRank. I just want to exercise my skills processing text / strings with Java.
The idea is to check if a password entered by a user follows the requirements stipulated in the challenged for a strong password. If it does not, one needs to return the number (not types) of characters missing to make current password specified by the user strong. Continue reading “Strong Password”
Earlier this morning I read a post “Binary Tree: The Diameter” by David Pynes. The post showed up on Medium but was initially written for Towards Data Science. After quickly reading the post I decided to spend time reading the article in my computer, thinking about it and writing a solution in Java. The original article used C++. Continue reading “BST Diameter”
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”
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”
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”
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”