It is Wednesday morning and the cleaning crew is at our place making lots of noise. Typically they show up on Fridays but due to personal issues they requested to move the appointment. They do an excellent job. If you live in the Twin Cities of Minneapolis and St. Paul and are in need of a good cleaning service, please let me know. I will pass your information so you can get in touch with them or vice versa. I value privacy. Continue reading “Implement Trie (Prefix Tree)”
Category: Data Structures
Vectors in Java
It is Monday morning. The cleaning lady who could not make it last Friday due to the snow storm in the area, called to reschedule for this upcoming Friday. Her car is in need to new tires. She will wait for the local side roads in Minneapolis to be cleared before venturing on roads and highways which typically are cleared hours after a snow storm fades. In general roads in Minneapolis and St. Paul are cleaned a day or more after a storm. They typically clean in two consecutive days in order for residents to move their cars from one side of the road to the other.
I had scheduled a video call today at 12:00 PM CST. At least that is what I recall. This morning around 07:00 AM I was down in my home office working. At some point I checked my Gmail and I had received a message to reschedule. Apparently I had missed the call. Continue reading “Vectors in Java”
Experimenting with RTree – JARs Created and Installed
It is Saturday morning and I am starting the text for this post. The process I used to get the RTree code ready and integrated into a test program that I will use to experiment in the next few days will be covered. As usual issues seem to appear and they need to get resolved.
Yesterday my wife and I brought in from our garage freezer a full pork butt that we purchased a month or so ago at Costco. Not sure how heavy it is but I recall looking for the largest package when we purchased it. Typically we split the butt into the two pieces that are packaged together. This time we decided to cook both at once. That way we can freeze most of it and use it as needed during the next month or two. Continue reading “Experimenting with RTree – JARs Created and Installed”
Queue implemented with 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”
Remove Linked List Elements
Logged 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”
I enjoy coding challenges. It makes me think outside my daily work routine. Last weekend I received the following email message from HackerRank:
Improve your skills with this challenge recommended for you:
Data Structures | 2,031 submissions
Print the correct order of plates.
The HackerRank team
Contacts without a Trie
This entry touches on the use of a Trie to look up complete or partial words from a specified set. In general Tries are typically used to look up completion words for a prefix (perhaps there are simpler and faster ways to implement such task). To learn more about the challenge please take a look at the following link: https://www.hackerrank.com/challenges/contacts.
Before we get into the code, I have copied and annotated part of the text from the following link: Continue reading “Contacts without a Trie”
Contacts with Trie
Have been somewhat busy in the past couple weeks. To add to it, last weekend I started an on-line “Spring” course. Classes run for three hours Saturdays and Sundays for one month. Need to get the assignments done in the next couple days.
A couple weeks ago I was talking with a manager about prefix searches. At the time I mentioned that I always take a quick look on the Internet to get a general idea on what to do. I did so and Tries came up as an initial candidate. I wrote a blog about it. I tend to be quite passionate with my work and computer science in general. I went and spent some time solving a challenge All Domains -> Data Structures- > Trie -> Contacts on HackerRank (https://www.hackerrank.com/challenges/contacts). Continue reading “Contacts with Trie”
Yesterday evening I was talking with a software manager about an algorithm to autocomplete words. The idea was to build a data structure that could help (hint) users with the available words that would match what has been entered so far. For example, if someone would be looking for my phone number in a company directory application and would have entered “can” then the autocomplete feature could display “cane” and “canessa”. Continue reading “Autocomplete”
Binary Heap or Priority Queue
It is a beautiful Sunday morning in Minneapolis, MN part of a long Labor Day weekend. Spent some time in the past couple days working on solving a HackerRank problem named QHEAP1. I want to discuss my approach and the reason I solved the problem twice. No, it was not get double points solving the same problem. I do not believe you can do that. Once a problem is solved it is flagged.
I always tend to refresh my knowledge (in this case) or learn about a new topic in order to better understand it before attempting to design a solution. You would be surprised how many people just looks for a solution on-line and never understand what they did or the ramifications if it is not just a standalone problem (i.e., HackerRank) but it is part of an application or system. Continue reading “Binary Heap or Priority Queue”