The Question is from the interview section of leetcode and is marked as easy difficult. Here is the description: The Problem Given a string s containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, determine if the input string is valid. An input string is valid if: Example 1: Input: s = “()” Output: true Example 2:…
Category: CodeMoments
We help you to enjoy every moment of Coding. Let’s Dive In
The Problem: Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “”. Example 1: Input: strs = [“flower”,”flow”,”flight”] Output: “fl” The Solution: This is a question from leetcode. Let me show you the solution and…
The websites these days are becoming more and more complex. And we have to load things in parts sometimes as micro components. Or maybe lazy loading some components just to better user experience. When we do this we need to create loader for heavy components that is replaced with the…
Monorepo and Microservices are two completely different concepts yet often used interchangeably You might have managed multiple repositories for inter related projects. Monorepo simply puts all these inter related projects into one single repositories. This way you have to manage one single repository for all the projects. You setup deployment…
The hottest topic in the software industry is microservices architecture. But, what is it? Microservices architecture is just a software development architecture that breaks your software into multiple small loosely coupled simpler services. These services are small in size, serves a specific purpose, very easy to maintain. Teams can work…
The Blog Industry shall prepare for the headless CMS revolution Content Management Systems played a really important role in the internet revolution. The blogs that you use to get information are all brought to you buy CMS. Without a CMS it is very difficult to maintain blogs. But CMS are…
Creating EC2 instances is as easy as pressing a button. But, connecting to EC2 is not as easy. There are basically two easy ways to connect to ec2 via windows and mac respectively. Macs are famous for the simplicity they bring to a developers life. In this case also macs…
A developer’s job is to solve problems. It’s not programming in javascript and knowing a few frameworks. As the problems evolve the developer also needs to evolve to be able to solve these problems. AWS or any other cloud platform is just the next evolution that the developers of the…
Understanding the lifecycle of a react component is very crucial. It enables you to write code at a certain point in the process. There are basically four important lifecycle methods: componentDidMount, componentDidupdate, componentWillUnmount, shouldComponentUpdate. Let’s look at these methods in detail. ComponentDidMount componentDidMount is a method that is invoked when…
ReactJS is a library that needs no introduction in the industry today. It is being used by small to large and even enterprise businesses to build intuitive user experiences. But, what led to React’s massive industry takeover? React first launched in 2012 didn’t gain much attention until late 2018 when…