Given a NxN matrix with 0s and 1s. A block with value 1 can be used to travel ahead in the matrix. Now, consider mat[0][0] as the starting point for the rat.
A vector is a data structure for maintaining a set of elements having a specific data type. Vectors can be considered as arrays having dynamic size. Just like arrays, vectors also store its elements in a contiguous storage locations.
To find the nth fibonacci number, we need not store previous Fibonacci numbers in an array. We could use two temporary variables instead of an array to store previous fibonacci numbers
A sorting algorithm is an algorithm that puts elements of a list into an order. Most frequently we’re required to sort data structures such as arrays, linked lists etc having numerical values. There’re various algorithms to sort a container or a data structure. In this post, we’ll discuss most popular or commonly used algorithms.
In mathematics, Pascal’s triangle is a triangular array of the binomial coefficients. It can also be viewed as: each number in Pascal’s triangle is the sum of the two numbers directly above it.
Given an integer array nums of size n, return the minimum number of moves required to make all array elements equal. In one move, you can increment n – 1 elements of the array by 1.
In this post we’ll delve deeper into the Python language’s concepts, structure and its syntax. We’ll learn about more complex parts of the language. In the later section, we’ll introduce Python’s most popular Machine Learning libraries. So let’s get started with the portion left from the previous post.