Emma’s Supercomputer or Two Pluses

I started the Emma’s Supercomputer HackerRank problem last week. This problem is also known as Two Pluses. Last week I got quite busy so I did not have time until this morning to complete the solution for the problem. Last Wednesday I was able to get my code to pass 20 of 23 test cases. I figured out what I could do to pass the last three, but until this morning I had no time.

The problem is ranked Medium difficulty, but I spent time like it was more difficult than that. Read the description in the HackerRank web site. The description is straight forward. I understood what the idea was with the plus signs, but from there to implement a solution that is a different story.

Continue reading “Emma’s Supercomputer or Two Pluses”

Almost Sorted

In the past few days there have been several announcements by both car and device manufacturers that self driving cars are almost a reality and to make that possible new and cheaper devices are being introduced to help.

It seems that newer LIDAR devices are improving in range and precision while their prices are coming down. This should help. On the other hand researchers are working on algorithms to check that sensors are getting more reliable. I read an article today that LIDAR systems can be tricked to not detect something or to detect something that is not there. Continue reading “Almost Sorted”

3D Surface Area

Good morning. It is Monday January 06, 2020. Last year’s holiday season was rather long. Christmas fell on Wednesday so most companies gave Tuesday as a holiday. On the following week, most companies do not give New Years Eve day as a holiday but most people take it as a personal holiday or vacation day. I work every day (included weekends and holidays). Granted that on weekends and holidays I only sit in front of my computer for only two 2-hour blocks. Continue reading “3D Surface Area”

The Grid Search

It is Saturday morning and I am in my second block of the day. I typically do a couple 2-hour blocks on weekend days. As usual I got up at 05:00 AM and got breakfast ready. During breakfast my wife mentioned that she was not feeling well. Apparently she caught a cold or flu.

We had invited for lunch a couple of her brothers and spouses. One of her brother’s birthday was yesterday.  We decided to change the menu and postpone lunch with family for next Saturday. We had planned a couple of Italian dishes and I was already savoring them. We both enjoy cooking but decided on a single simpler course for lunch. Continue reading “The Grid Search”

To Trie or not to Trie

I am always interested in learning new and refreshing on known algorithms. I looked at a problem in HackerRank which at this time is not relevant. The problem involves looking for sub strings in a string. There are many algorithms that could be used, but as the saying goes, there are many ways to skin a cat, but I always say that one and only one is the best.

I am not going to discuss the some possible approaches to solve the problem in this post. I will take a look at Tries which might be close. Will build a node for the trie, a trie and then will attempt to figure out if by modifying the node and possibly the trie, I can solve the problem. If we are not able to solve the challenge (I do not expect to solve it with a base Trie), will cover a better approach in the next post. Continue reading “To Trie or not to Trie”

Bigger is Greater

I was going to have a different introduction (the regular chit chat) to this post, but based on the article “Malevolent Machine Learning” by Chris Edwards on Communications of the ACM 12/2019 Volume 62 Number 12 I changed my mind. Allow me to explain.

A couple years ago I took a few courses from Coursera. The general topic was big data and machine learning. The course of interest is “Neural Networks and Deep Learning” by Andrew Ng deeplearning.ai. It was very interesting class and I highly recommend it.

I tried locating my notes on those courses, but not sure what I did with them. Found my notes. I hoped to have stored the transcriptions to verify what I recall about a specific class. I do not have the transcriptions Continue reading “Bigger is Greater”

Matrix Layer Rotation

I am moving along with a project at work. I have completed the first pass. I am now optimizing the code and testing the system as a whole. As soon as I am done will move to replacing a component with a machine learning (ML) model. I am planning on developing the model using Azure. I would like to see if it is better that using OCR (Optical Character Recognition). Will let you know the results later this month.

I decided to give a try to the HackerRank Matrix Layer Rotation challenge. The challenge is rated HARD and worth 80 points. If interested take a look at the requirements. If interested you can read about how I addressed the problem in this post. Continue reading “Matrix Layer Rotation”

Organizing Containers of Balls

Hope you had a happy Thanksgiving Day with your family. As usual there is lots of anticipation and suddenly it is over.

Some years my wife and I have gone out shopping on Black Friday, but as time goes by, it seems that most of the shopping can be done on-line. For that, the best day seems to be Cyber Monday. Besides the ability of shopping from the computer on Cyber Monday, there was a lot of snow and ice over in the Twin Cities of Minneapolis and St. Paul over the Thanksgiving holiday. One of my wife’s nephews posted on Facebook a video of cars slipping and sliding all over in Minneapolis. Continue reading “Organizing Containers of Balls”

Sliding Window

I been reading, watching videos and experimenting with the Universal Windows Platform (UWP) and cpp/WinRT most of the day. On this final block I decided to take a break and make a post in my blog. I want to get some software done before the end of the day this Wednesday. Will let you know if I meet the deadline.

I noticed in my Gmail that JAVAAID had posted a video on YouTube titled “Sliding Windows Technique”. It called my attention because the Rabin-Karp algorithm is based on a sliding window technique.  In the past few months I wrote a post on the subject and named it “Rabin-Karp Algorithm” (not too creative on my part). Continue reading “Sliding Window”

Graph Search DFS and BFS

It is Sunday November 10, 2019 around 10:30 AM. As usual get up at 05:00 AM, prepare and have breakfast with my wife, shower, get dressed and go down to my home office for the first two-hour block of the day. I practice the Deep Work technique methodology by Cal Newport. I have been practicing the technique for years and it seems to work for me.

After the first block of the day I prepared tea and my wife and I sat down in the living room to chat. The high temperature yesterday was 44 F. The high for today is 30 and currently we are at 29. Taking in consideration wind, the wind chill is at 19 degrees. We were considering going out to Trader Joe’s to get some tea which we are running low, but we decided to have an early lunch and watch some movies this afternoon on Amazon Prime and Netflix. Continue reading “Graph Search DFS and BFS”