Dev Prakash Sharma has Published 556 Articles

How to plot Exponentially Decaying Function using FuncAnimation in Matplotlib

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 06:17:50

171 Views

Let us assume that we want to animate a nature of function which is exponentially decaying like y = a(b)^x where b = growth factor and a = initial value.An exponentially decay function would look like this, However, for now, we want to animate and plot the exponentially decaying tan ... Read More

How to create custom markers on a plot in Matplotlib

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 06:08:50

592 Views

To create a custom marker on a plot or graph, we use a list where we write the markers we want to see in the plot. The markers are nothing but symbols, emoji, character or any character which we want to see on the figure.In order to create the marker, ... Read More

Significance of regex match() and regex search() function in Python

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 05:50:24

478 Views

There are two types of operations that can be performed using regex, (a) search and (b) match. In order to use regex efficiently while finding the pattern and matching with the pattern, we can use these two functions.Let us consider that we have a string. regex match() checks the pattern ... Read More

Breadth First Search on Matrix in Python

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 05:37:17

2K+ Views

In a given matrix, there are four objects to analyze the element position: left, right, bottom, and top.Breadth First Search is nothing but finding the shortest distance between the two elements of a given 2-D Matrix. Thus, in each cell, there are four operations we can perform which can be ... Read More

How to Segregate a given Linked List in C++

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 05:22:40

140 Views

A Linked List is a linear data structure in which each node has two blocks such that one block contains the value or data of the node and the other block contains the address of the next field.Let us assume that we have a linked list such that each node ... Read More

Check if a Tree is Isomorphic or not in C++

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 04:50:26

254 Views

In a binary tree, each node contains two children, i.e., left child and right child. Let us suppose we have two binary trees and the task is to check if one of the tree can be obtained by flipping another tree by left of it or not.A Tree is Isomorphic ... Read More

Breadth First Search on Matrix in C++

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 04:49:36

988 Views

In a given matrix, there are four objects to analyze the element position: left, right, bottom and top.Breadth First Search is nothing but finding the shortest distance between the two elements of a given 2-D Matrix. Thus in each cell, there are four operations we can perform which can be ... Read More

Binary Tree Tilt in C++

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 04:47:44

197 Views

Let us consider that we have the root node of a binary tree; the task is to find and return the sum of tilt of every node.The tilt of a binary tree is nothing but constructing the binary tree by finding the absolute difference of child nodes in the left ... Read More

Tim Sort Algorithm in C++

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 05-Feb-2021 12:59:11

1K+ Views

The Timsort is a stable sorting algorithm that uses the idea of merge sort and insertion sort. It can also be called as a hybrid algorithm of insertion and merge sort. It is widely used in Java, Python, C, and C++ inbuilt sort algorithms. The idea behind this algorithm is ... Read More

What are Delannoy Numbers? Write a program in C++ to find the Delannoy number

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 05-Feb-2021 12:58:37

144 Views

Delannoy Numbers − A Delannoy number D describes the number of paths from the southwest corner(0, 0) to northeast corner(a, b) in a rectangular grid using only allowed steps east ( →), northeast ( ↗ ) and north ( ↑ ).Thus, we can say that a recurrence relation is, D(a, ... Read More

Advertisements