In this post we will attempt to solve LeetCode 232 Implement Queue using Stacks. I believe this problem is similar to another I solved in this blog several years ago. If interested take a look at the post Queue implemented with Stacks.
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”
It is Friday evening. It seems that the weeks are going by faster than ever. Hopefully the COVID-19 vaccine will make a huge difference all over the world and we will be able to get on with our lives.
Earlier this week, I decided to add some spice to this blog. If you are a follower you should have noticed that lately most of the problems are being solved in Java. In the near future I will be using C and C++ if such languages would provide simpler and higher performance solutions. That said, if I get a request to generate a solution in Java, I will generate a separate post. Continue reading “Design Linked List”
It is Thursday morning and it has been a long week at work. Apparently we have been experiencing lots of issues with our cloud platform. It seems that the storage server works fine when running on bare metal, but it experiences network related issues when running on virtual machines. We are currently looking at what might be causing the issues with the stack in VMs.
Before we start dealing with the problem at hand, I want to mention that I have a few books on algorithms. Like most people, I like to avoid spending money when I can get the same or similar results by doing a web search and reading the resulting material. I am a member of the ACM. I have access some of O’Reilly materials on-line. I believe both the books and videos have helped me locate quality information and are planning on continuing to use it. Continue reading “Alien Dictionary”
It is an ugly rainy and stormy day in the Twin Cities of Minneapolis and St. Paul. It seems like the storms will resume around 03:00 PM later today. In general I shutdown all my desktop computers when there are thunderstorms. I have a couple UPS units but I have also invested time installing software and configuring them exactly the way I like it. Do not wish to change disks or re install software.
Earlier today I opened the LeetCode web site and selected the problems icon. In the search box I entered the word “recursion”. Many problems were listed. I sorted them by difficulty Easy to Difficult. I then selected problem 933. Number of Recent Calls. Time permitting, decided to tackle three problems in the three categories in the next few days. Continue reading “Number of Recent Calls”
Most software developers now a day write code using object oriented (OO) programming languages. In some cases, due to performance reasons, some code may be written using a non OO language. One way or the other, the question may come up if return codes are better than using exceptions. I do not believe you can come with enough reasons to justify one method or the other which would be accepted by most software developers. What I will do is discuss some considerations and give my opinion. Please take it all with a grain of salt. Continue reading “Returned Value versus Exception Handling”