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

# Tag: programming

## 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**

## Binary Tree and its traversal using python.

After a long time I took a look in algorithms and data structure and what I wrote first in Binary Tree and its different traversal in C++. I have never written them in python so I tried to write one. And yes writing them down in python is lot more easier. So lets me first introduce

## Python: Increasing performance of your code: For vs Map

In this performance of programming language article we are going to talk about some small tips which will help you in Increasing performance of your python code. Lookup for function is costly. Lets say we have to write a loop which will run till the length and calls upper on each string. alist = [‘a’,’b’,’c’] for item