Block swap algorithm for array rotation in Java

By Reetesh Kumar

In this tutorial, we’ll learn the block swap algorithm for array rotation (left) in Java. Consider a given array (a) : 1,  2,  3,  4,  5,  6,  7,  8,  9 After rotatin.... Read More

How to Count maximum points on same line in Python

By Yatharth Jain

A line contains an infinite number of points on its surface. Hence, if we are given a set point then there is a huge possibility of more than 1 point lying on the same line.  So t.... Read More

Diagonal traversal of a binary tree in Python

By Yatharth Jain

The problem is that given a binary tree we need to print all the elements diagonally. A binary tree is a type of tree with each internal node has at most two children, one left and.... Read More

Validate a PAN Card number in Java using Regular Expression

By Caushik Subramaniam

A Regular Expression is a sequence of characters that define a search pattern, usually used for searching and replacing patterns in strings. Many different programming languages su.... Read More

Difference between find() and index() in Python

By Karandeep Singh

Hey, guys today we are going to learn the difference between find() and index() in Python. Both these string methods are very similar but have few differences. Before starting with.... Read More

Shortest path in an unweighted graph in Python with Diagram

By Saksham Agarwal

In this blog, we’ll see how we can find the shortest path in an unweighted graph in Python. Ex: Now there are many ways you can tackle this problem. You can use the Bellman-F.... Read More

How to count maximum points on same line in Java

By Monika Maheshwari

In this section, we are going to learn how to count points that lie on the same line. So, for points to be lying on the same line, the slope needs to be the same. The idea of slope.... Read More

How to Improve Accuracy Of Machine Learning Model in Python

By Vanshika Namdev

Machine Learning model accuracy is the measurement to decide which model is best to do prediction. Machine Learning model accuracy is very essential as the cost of error can be hug.... Read More