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