In this post we will attempt to solve the Codility_ problem Fish (https://app.codility.com/programmers/lessons/7-stacks_and_queues/fish/) in which we are given N voracious fish are moving along a river. Calculate how many fish are alive. Continue reading “Codility_ problem Fish in Java”
Good day! Hope all is well in your neck of the woods. My wife left lunch in the oven and ran to the dentist office. She left the oven on. Not sure when I should shut it down. I think I will do it right now before the food gets burned. When she gets back we can turn on the oven back if needed.
OK, the oven is off. It is 01:00 PM. I am starving. Hope my wife returns shortly so we can have lunch. Continue reading “Stone Wall”
I am working on the last 2-hour block of the day. My wife was trying to make a payment for our Internet service, but she needs a number that can only be found in a previous bill receipt. Apparently she can not find one, so at the end of the workday we will go to make a payment in person and will hopefully keep the receipt, so this situation does not repeat. Continue reading “Middle of the Linked List”
Happy Tuesday! Hope you had a nice long weekend. Labor Day in Minnesota marks the official summer season. The Minnesota State Fair ended yesterday. It flags the start of public schools and public universities in our state. In general, private schools and universities start a few weeks earlier.
My wife and I did not have too many things to do over the long weekend. Pretty much we did some grocery shopping, walking, and cook meals. We did watch on Amazon Prime an interesting and somewhat older movie. Trumbo was released on DVD in September 15, 2009. The movie provides interesting facts about the Hollywood Blacklist. It describes interesting and dark moments for liberty and freedom in the USA. Hopefully we have learned something and it will not repeat. The black list has nothing to do with African Americans. These events are associated with white people that disagreed with the main stream ideas of the time. The movie starts in 1947, a few years after the WWII ended. When you get a chance spend a couple hours watching this movie.
On a separate note, this post has as of right now 9,037 subscribers. Thank you very much!!! Continue reading “Memory Pools – O(1) Storage”
Yesterday morning I attended a one hour webinar sponsored by the Association for Computing Machinery titled ACM Queue Case Study Q&A: Always-On Time-Series Database. It was very interesting. There was no presentation segment. There were only questions. The presenter, Theo Schlossnagle which is the founder of Circonus was very eloquent and seems very versed in the technology and their products.
During the conference I made several notes and searched for several topics that I found of interest. I will be reading the associated pages later this week. Continue reading “Reverse Operations Revisited”
It is pitch dark in the Twin Cities of Minneapolis and St. Paul. Before calling it a day I decided to try one more practice problem from the Facebook web site. Balance Brackets is a very common problem. In general the idea is that you are given a set of brackets and are sked to determine if the brackets are balanced.
I knew I have solved similar versions of the problem. When done with the code I move to a different computer and type in the contents for the post. I looked up in my web site for the string “balanced brackets” and found Balanced Brackets and Balanced Brackets – Possible Second Attempt. I generated the post in 2016 and 2017 respectively. I guess, we will have a third version. Continue reading “Balance Brackets”
Hi gals and guys. Hope you are doing well during the COVID-19 pandemic. It seems that most of us are somewhat tired following the basic rules that reduce the spread of the coronavirus. By relaxing the rules in the past few months, the numbers of COVID-19 infections, in most cities worldwide, are going up. Note that the issue is the number of infections, not the number of deaths. Infected people may need hospital services. If the number of patients is larger than the capacity like it was when this thing started, then we have a problem. At this point in time, people with most infections per 1,000, is people in college age. Please follow the rules! We all benefit from it. Continue reading “Print Immutable Linked List in Reverse”
It is Monday evening. Yesterday, with the help of my wife we cleaned a spot in my home office and put together the 4K monitor and computer. Later I set up the computer. The monitor is impressive. The only this missing for today is to connect the Azure Kinect DK and start experimenting.
Today I solved (at least I think) the 3.2 question Stack Min from the book “Cracking the Coding Interview”. The question follows: “How would you design a stack which, in addition to push and pop, has a function min which returns the minimum element. As I am reading the question I want to state that when I was solving the problem, I agreed with the imaginary interviewer that min function would return the min value. We could also have the solution return the minimum element (the actual node), but we decided that that was not the scope of the question. Continue reading “Stack Min”
I have noticed that multiple times in a week I wake up and check my phone for the time and it is 04:47 AM. Given that I live in the Twin Cities of Minneapolis and St. Paul, there is some day light at that time. I recall a few years ago when I would get up around 05:00 AM to walk the dogs.
I do have an alarm set for 05:00 AM 7 days a week. In addition I have set an appointment in my Google calendar for the same time. Today after waking up at 04:47 AM I checked the calendar to see if there was a message or notification set for 15 minutes before (04:45 AM). Both notification and email are set for 05:00 AM. Continue reading “13 to 15 Java Questions”
I have not solved a LeetCode challenge in a couple weeks. Went to the site and the system suggested the Valid Parentheses using the following URL: https://leetcode.com/problems/valid-parentheses/
The idea is to determine if a sequence of parentheses in a string are properly matched. Please take a look at the actual challenge using the previous URL.
Following is a screen capture of the console on my Eclipse IDE: Continue reading “Valid Parentheses”