Tag: array algorithms
Given a list of positive integers nums, return whether you can divide the list into two groups a and b such that: The sum of a and the sum …
Given an array arr, replace every element in that array with the greatest element among the elements to its right, and replace the last element with -1. After doing …
Given an array of integers arr, write a function that returns true if and only if the number of occurrences of each value in the array is unique. Example …
In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as every …