1823. Find the Winner of the Circular Game
There are n friends that are playing a game. The friends are sitting in a circle and are numbered from 1 to n in clockwise order. More […]
There are n friends that are playing a game. The friends are sitting in a circle and are numbered from 1 to n in clockwise order. More […]
There are numBottles water bottles that are initially full of water. You can exchange numExchange empty water bottles from the market with one full
There are n people standing in a line labeled from 1 to n. The first person in the line is holding a pillow initially. Every
You are given the head of a linked list, which contains a series of integers separated by 0‘s. The beginning and end of the linked list will have Node.val ==
A critical point in a linked list is defined as either a local maxima or a local minima. A node is a local maxima if the current node has
You are given an integer array nums. In one move, you can choose one element of nums and change it to any value. Return the
Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as
Given an integer array arr, return true if there are three consecutive odd numbers in the array. Otherwise, return false. Example 1: Input: arr
Alice and Bob have an undirected graph of n nodes and three types of edges: Type 1: Can be traversed by Alice
You are given a positive integer n representing the number of nodes of a Directed Acyclic Graph (DAG). The nodes are numbered from 0 to n –
You are given an integer n denoting the number of cities in a country. The cities are numbered from 0 to n – 1. You
There is an undirected star graph consisting of n nodes labeled from 1 to n. A star graph is a graph where there is one center node and exactly n –