Minimum Cost Path
Given a square grid of size N, each cell of which contains an integer cost that represents a cost to traverse through that […]
Given a square grid of size N, each cell of which contains an integer cost that represents a cost to traverse through that […]
Given two sorted arrays of distinct integers arr1 and arr2. Each array may have some elements in common with the other array. Find the maximum sum of a
You are given an array arr, you need to find any three elements in it such that arr[i] < arr[j] <
The n-queens puzzle is the problem of placing n queens on a (n×n) chessboard such that no two queens can attack each other.Given an integer n,
Given the head of a linked list, determine whether the list contains a loop. If a loop is present, return the
Given an array of integers arr, sort the array according to the frequency of elements, i.e. elements that have higher frequency comes first. If the
Given an integer array arr of integers, the task is to find the maximum absolute difference between the nearest left smaller element and the nearest right
Given two strings pattern and str which may be of different size, You have to return 1 if the wildcard pattern i.e. pattern, matches with str else return 0. All characters of
Given two positive integer arrays arr and brr, find the number of pairs such that xy > yx (raised to power of) where x is an element from arr and y is an
You are given weights and values of items, and put these items in a knapsack of capacity W to get the maximum
Given a sorted dictionary of an alien language having N words and k starting alphabets of standard dictionary. Find the order
You are given an Undirected Graph having unit weight of the edges, find the shortest pathfrom src to all the vertex and if it is unreachable to reach