1395. Count Number of Teams
There are n soldiers standing in a line. Each soldier is assigned a unique rating value. You have to form a team of 3 soldiers […]
There are n soldiers standing in a line. Each soldier is assigned a unique rating value. You have to form a team of 3 soldiers […]
A city is represented as a bi-directional connected graph with n vertices where each vertex is labeled from 1 to n (inclusive). The edges in the graph are
You are given two 0-indexed strings source and target, both of length n and consisting of lowercase English letters. You are also given two 0-indexed character arrays original and changed, and an integer array cost,
There are n cities numbered from 0 to n-1. Given the array edges where edges[i] = [fromi, toi, weighti] represents a bidirectional and weighted edge between cities fromi and toi, and given
Given an array of integers nums, sort the array in ascending order and return it. You must solve the problem without using
You are given a 0-indexed integer array mapping which represents the mapping rule of a shuffled decimal system. mapping[i] = j means digit i should be mapped to
Given an array of integers nums, sort the array in increasing order based on the frequency of the values. If multiple values have
You are given an array of strings names, and an array heights that consists of distinct positive integers. Both arrays are of length n. For each
You are given a positive integer k. You are also given: a 2D integer array rowConditions of size n where rowConditions[i] = [abovei, belowi], and a 2D integer
You are given two arrays rowSum and colSum of non-negative integers where rowSum[i] is the sum of the elements in the ith row and colSum[j] is the sum of the
Given an m x n matrix of distinct numbers, return all lucky numbers in the matrix in any order. A lucky number is an element of the matrix such that it
You are given the root of a binary tree and an integer distance. A pair of two different leaf nodes of a binary tree is