Dev Prakash Sharma has Published 548 Articles

Changing the Mouse Cursor in Tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 04-Mar-2021 13:33:03

1K+ Views

Tkinter is a GUI-based Python library which is used to develop various types of functional and GUI-based applications. It provides lots of functions and methods that can be used to provide extensibility and various features while developing an application.In this article, we will see how we can change the mouse ... Read More

Average Speed Calculator using Tkinter

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 04-Mar-2021 13:30:27

497 Views

In this article, we will see how to create a GUI-based application that will calculate the average speed. The average speed of a moving object can be calculated using the following formula, Average Speed = Distance / [Hours + (Minutes/60)]To select the input value, we will use the SpinBox method ... Read More

How to Plot Cluster using Clustermaps class in Matplotlib

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 19:45:42

278 Views

Let us suppose you have given a dataset with various variables and data points thus in order to plot the cluster map for the given data points we can use Clustermaps class.In this example, we will import the wine quality dataset from the https://archive.ics.uci.edu/ml/datasets/wine+quality.import matplotlib.pyplot as plt import numpy as ... Read More

C++ Program to Check Whether a given Binary Tree is a Full Binary Tree or not

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 19:41:10

2K+ Views

Given a Binary Tree, the task is to check whether it is a Full Binary Tree or not. A Binary Tree is said to be a Full Binary Tree if every node has zero or two children.For ExampleInput-1Output:1Explanation: Every node except the leaf node has two children, so it is a ... Read More

C++ Program to find the smallest digit in a given number

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 19:39:23

4K+ Views

Given a non-negative number, the task is to find its smallest digit.For exampleInput:N = 154870Output:0Explanation: In the given number '154870', the smallest digit is '0'.Approach to Solve this ProblemThe simplest approach to solve this problem is to extract the last digit in the given number using the remainder theorem. While traversing ... Read More

Circle Sort in C++

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 19:38:17

434 Views

Circle Sort is an interesting sorting algorithm to sort a given array of elements. The algorithm compares the elements of the array diametrically and once the elements in one part is sorted, then continuously sort the other end of the array diametrically.ExampleLet us visualize the circle sort for an array. ... Read More

Copy list with random Pointer in C++

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 19:35:41

781 Views

A Linked List is a linear data structure in which each node is having 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 ... Read More

Find the Number of 1 Bits in a large Binary Number in C++

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 19:34:20

3K+ Views

Given a 32-bit Unsigned Binary Number, the task is to count the set bits, i.e., '1's present in it.For ExampleInput:N = 00000000000000100111Output:4Explanation: Total set bits present in the given unsigned number is 4, thus we will return the output as '4'.Approach to Solve this ProblemWe have given an unsigned 32-bit binary ... Read More

C++ Program to find the Shortest Distance to a character

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 19:32:58

555 Views

Given a string 'a' and a character 'char', the task is to print the distance of 'char' from each character of the given string. The size of the distance array is same as the size of the string, since we have to find the distance of the character from each ... Read More

Find the sum of left leaf nodes of a given Binary Tree in C++

Dev Prakash Sharma

Dev Prakash Sharma

Updated on 23-Feb-2021 19:29:51

1K+ Views

Let us suppose we have a Binary Tree having a root node and its left child and right child. The task is to find the total sum of leaf nodes of the tree which are left to its parent node.For ExampleInput-1:      Output:15Explanation: In the given input Binary Tree, the sum ... Read More

Advertisements