Word Search
You are given a two-dimensional mat[][] of size n*m containing English alphabets and a string word. Check if the word exists on the mat. The word […]
You are given a two-dimensional mat[][] of size n*m containing English alphabets and a string word. Check if the word exists on the mat. The word […]
An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You are given an
You are given a positive integer n representing the number of nodes in an undirected graph. The nodes are labeled from 1 to n. You are also
Implement the function power(b, e), which calculates b raised to the power of e (i.e. be). Examples: Input: b = 3.00000, e = 5Output: 243.00000
In this problem, a tree is an undirected graph that is connected and has no cycles. You are given a graph that
You are given a 0-indexed 2D matrix grid of size m x n, where (r, c) represents: A land cell if grid[r][c] = 0, or A water cell containing grid[r][c] fish, if grid[r][c] > 0.
Given a string s, which may contain duplicate characters, your task is to generate and return an array of all unique permutations of
There are a total of numCourses courses you have to take, labeled from 0 to numCourses – 1. You are given an array prerequisites where prerequisites[i] = [ai,
A company is organizing a meeting and has a list of n employees, waiting to be invited. They have arranged for a
Given the head of a linked list that may contain a loop. A loop means that the last node of
Given a head of the singly linked list. If a loop is present in the list then return the first node of the loop else return NULL. Custom Input format:A head of a