Latest Posts From Jayant Verma

Quicksort

How to Implement QuickSort in Python?

Quicksort is a sorting algorithm that follows the policy of divide and conquer. It works on the concept of choosing a pivot element and then arranging elements around the pivot by performing swaps. It recursively repeats this process until the array is sorted. In this tutorial we will learn how QuickSort works and how to […]

Inf

Infinity in Python – Set a Python Variable Value to Infinity

A simple number cannot represent your dataset? How about setting your variable value to infinity in Python? Today we’re talking about just that! While coding in Python, we often need to initialize a variable with a large positive or large negative value. This is very common when comparing variables to calculate the minimum or maximum […]

Pie Chart

How to Plot and Customize a Pie Chart in Python?

A pie chart is a circular statistical graphic, which is divided into slices to illustrate numerical proportions. In a pie chart, the arc length of each slice is proportional to the quantity it represents. Pie charts are a popular way to represent the results of polls. In this tutorial, we will learn how to plot […]

0:1 Knapsack

Solving 0/1 Knapsack Using Dynamic programming in Python

In this article, we’ll solve the 0/1 Knapsack problem using dynamic programming. Dynamic Programming is an algorithmic technique for solving an optimization problem by breaking it down into simpler subproblems and utilizing the fact that the optimal solution to the overall problem depends upon the optimal solution to its subproblems. 0/1 Knapsack is perhaps the […]

Trie Implementation

Implementing a Trie Data Structure in Python

Trie data structure is very efficient when it comes to information retrieval. It is majorly used in the implementation of dictionaries and phonebooks. It is also useful for implementing auto-text suggestions you see while typing on a keyboard. In this tutorial, we will understand how to implement our own trie data structure in Python. In […]

Nans

Understanding NaN in Numpy and Pandas

NaN is short for Not a number. It is used to represent entries that are undefined. It is also used for representing missing values in a dataset. The concept of NaN existed even before Python was created. IEEE Standard for Floating-Point Arithmetic (IEEE 754) introduced NaN in 1985. NaN is a special floating-point value which […]