Have you heard of zen of python? If not why don’t you type the below command in the python console. When you press enter few philosophies will come up and these are called the zen of python. In this article, we are going to see what these philosophies tell us exactly. Beautiful is better than
Design Pattern and its usefulness in programming systems.
This is a blog series is dedicated for Design Pattern and its usefulness in programming systems. We will discuss in detail about each and every design pattern. We will try to answer the most essential questions Why? How? Where? What. We will try to implement these design pattern in nodejs and golang. Writing a code is
Mutable vs Immutable datastructures: Pros and Cons
Mutable vs Immutable datastructures are part of most of the programming languages so it is important to know how they behave, their strong and weak points. This blog is divided into two parts and it will talk about difference between the two parts. First part majorly deals with the benefits and drawbacks of immutability. Lets
Implementing graph with python and how to traverse.
When we talk about algorithms, graphs are one of the most important parts to know about. In this session, we will talk about graphs and implementing graph in python. What is a graph? A graph is a data structure consists of nodes and edges. It is nonlinear and can form very complex structures. If you
Generators in Python
Generators are just like normal functions, what makes functions generators in yield statement instead of the return statement. Also since you starting to read about generators, you should have a look at Iterators in python and how it works.Lets read about generators in python. What is yield? Yield is a keyword that is used to
Best practices for programming
In this article, we will talk about best practices for programming in any language. Add readability to your code as much as possible. The function name should tell what this function does. The function should be visible in one screen. You should not scroll to view the whole function. Try to write pure functions instead
Sieve of eratosthenes in python for Generating Prime numbers
Prime numbers are very important. Most of the modern day encryption decryption relies heavily on these prime numbers. Thus generating these prime number is a good task in itself. In this article we will see how we can generate list of prime number using sieve of Eratosthenes. What is sieve of Eratosthenes? To find all the prime
Length of Longest Increasing Subsequence (LIS) in python [Dynamic Programming]
The LIS or longest increasing subsequence means to find a subsequence in list of numbers in which the subsequence’s elements are in ascending order and in which the subsequence is as long as possible. This subsequence does not have to be continuous. Here we have to find the length of the longest increasing subsequence. We
Codiva: Online code compiler that compiles on the fly.
When it comes to compiling code for competitive programming, I prefer using online compilers as they don’t need to be installed and no need to run codes to run them. These were some features I like about online compiling and I don’t want to run commands to compile. What I hate was compiling again and
Major algorithms asked during Interviews.
Here I am going to mention the list of major algorithms asked during Interviews. You can find the list as below. Major algorithms asked during Interviews. Below are the books I highly recommend for algorithms Graph 1. Breadth First Search (BFS) 2. Depth First Search (DFS) 3. Shortest Path from source to all vertices **Dijkstra**