947. Most Stones Removed with Same Row or Column
On a 2D plane, we place n stones at some integer coordinate points. Each coordinate point may have at most one stone. […]
On a 2D plane, we place n stones at some integer coordinate points. Each coordinate point may have at most one stone. […]
Given the head of a linked list, determine whether the list contains a loop. If a loop is present, return the
You are given two m x n binary matrices grid1 and grid2 containing only 0‘s (representing water) and 1‘s (representing land). An island is a group of 1‘s connected 4-directionally (horizontal or vertical).
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
You are given an undirected weighted graph of n nodes (0-indexed), represented by an edge list where edges[i] = [a, b] is an undirected
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 the root of an n-ary tree, return the postorder traversal of its nodes’ values. Nary-Tree input serialization is represented in their level
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 the root of a binary tree, return the postorder traversal of its nodes’ values. Example 1: Input: root = [1,null,2,3] Output: [3,2,1] Example
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
Given a string n representing an integer, return the closest integer (not including itself), which is a palindrome. If there is a tie,
You are given weights and values of items, and put these items in a knapsack of capacity W to get the maximum