Posts

Showing posts with the label coding interview problem

What is the time complexity of the combination sum?

Image
  Do you know? The time complexity varies for different coding problems!  The amount of time an algorithm needs to run as the input size initiates is measured by its time complexity.  The time complexity is denoted by Big ‘O’ notation, it describes the running time's upper bound.  In this blog, you will get to know about a specific coding problem known as combination sum time complexity.  Combination sums is where you have to achieve a target using various given values.  Different approaches have different time complexities, finding the one that is the most efficient is important. So, read till end you will get to know the one which can help you solve the sum combination problem with reduced time complexity.  First, let’s take a brief about combination sum problem. What is the Combination sum? Combination sum is a problem where you are provided with a set of unique positive integers along with a target value. The goal is to identify every single comb...

Free Lisp to Check Missing and Repeating Number in Sequence

Image
The creation of video games, artificial intelligence, and natural language processing have all made extensive use of a robust and adaptable programming language known as Lisp.  Working with numerical sequences, or dealing with binary or burn tree are some of Lisp's main strengths, making it an excellent candidate because it effectively manipulates lists. In this blog, we'll look at how to find missing and repeating numbers using a free Lisp dialect like SBCL or Clisp.  Starting off with the method's fundamental theory as well as the crucial functions and variables from Lisp standard library.  Then, moving on you will get to know a quick and effective technique that keeps track of the regularity of each value in the sequence using a hash table. This approach is easy to use, making it a suitable option for both novice and seasoned programmers. But first let’s get a brief about free lisp. What is Free Lisp? The programming language Lisp has an open-source variant called Fr...

How often can you Buy and Sell the same stock?

Image
The stock market is notoriously unpredictable. It can be hard enough to guess whether or not a particular investment will pay off or not. We know that understanding all the nuances of rules and regulations involved when buying and selling stocks is difficult. One big question many people have is, “How often can you buy and sell the same stock with transaction fee ?”  Before you start trading, you are unaware of the steps to follow to start trading and what would be the best time to buy and sell stock with transaction fee.  No matter if this is your first time investing or if you’ve been around the block a few times before, we hope that our guide will help you understand briefly on how to sell and buy stocks with in same time. Let's start with understanding stock trading and the types of traders in detail. What is Stock trading? The term "stock trading" describes the purchasing and selling of equities on a stock market. Investors that purchase and sell stocks with the inte...

Print Shortest Common Supersequence in Python

Image
Have you ever been confused about the various functions Python has to offer? Despite having learned several of these terms in school, we are still rather uneducated on the wonders of the world of programming. There is a lot to learn, a bank of knowledge that never ends when it comes to coding and programming. Most coding beginners will start with Python when starting to learn how to code. This is because Python is perhaps one of the simplest coding languages out there.  Python is an object-oriented programming language with built-in data structures and several libraries.  It was first introduced in 1991 by the Python Software Foundation. It presently works on nearly all operating systems, including Windows, macOS Linux, Android and more. It is also one of the most widely used programming languages in the present day and time.   What are the uses of Python? There are several everyday applications of Python. These include, but are not limited to: Web and internet developmen...