2359. Find Closest Node to Given Two Nodes
2359. Find Closest Node to Given Two Nodes
Description
You are given a directed graph of n
nodes numbered from 0
to n - 1
, where each node has at most one outgoing edge.
2359. Find Closest Node to Given Two Nodes
You are given a directed graph of n
nodes numbered from 0
to n - 1
, where each node has at most one outgoing edge.
1474. Delete N Nodes After M Nodes of a Linked List
You are given the head
of a linked list and two integers m
and n
.
You have been tasked with writing a program for a popular bank that will automate all its incoming transactions (transfer, deposit, and withdraw). The bank has n
accounts numbered from 1
to n
. The initial balance of each account is stored in a 0-indexed integer array balance
, with the (i + 1)^th
account having an initial balance of balance[i]
.
2604. Minimum Time to Eat All Grains
There are n
hens and m
grains on a line. You are given the initial positions of the hens and the grains in two integer arrays hens
and grains
of size n
and m
respectively.
2488. Count Subarrays With Median K
You are given an array nums
of size n
consisting of distinct integers from 1
to n
and a positive integer k
.