Tag: array algorithm
You are given a list of integers nums. Consider an operation where we select some subset of integers in the list and increment all of them by one. Return …
Given a list of integers nums and an integer target, return the number of triples i < j < k that exist such that nums + nums + nums …
You are given a list of integers nums. Return the number of pairs i < j such that nums = nums. Constraints 0 ≤ n ≤ 100,000 where n …
Given a list of integers nums, consider an operation where you pick any number e and remove every number in nums equal to e. Return the minimum number of …
Given a list of integers nums and an integer k, return whether there are four distinct elements in the list that add up to k. Constraints n ≤ 100 …