Articles for author: Paras Yadav

Prefix Sum

Given an array arr of size n, the prefix sum is another array (say prefixSum) of same size such that for each index 0 <= i < n prefixSum[i] denotes a[0] + a[1] .... + a[i]. Scope This article tells about the prefix sum. In this article we will learn different approaches to find the ...

Best First Search

Best First Search is a heuristic search algorithm that selects the most promising node for expansion based on an evaluation function. It prioritizes nodes in the search space using a heuristic to estimate their potential. By iteratively choosing the most promising node, it aims to efficiently navigate towards the goal state, making it particularly effective ...

Connect Nodes at Same Level

Given a Binary Tree, The task is to connect all the adjacent nodes at the same level starting from the left-most node of that level, and ending at the right-most node Scope This article help us know about how to Connect Nodes at Same Level. In this article we will learn connect nodes using the ...

Matrix Chain Multiplication

The number of multiplication steps required to multiply a chain of matrices of any arbitrary length $n$ highly depends on the order in which they get multiplied. As multiplication of two numbers/integers is a costly operation, it is very much needed to find the optimal order of multiplying a chain of matrices to minimize the ...