Showing 3 of 8 questions
You're given the costs of candies and a discount: for every three candies you buy, the cheapest one is free. Find the minimum total cost to buy all the candies.
#1. Minimum Cost of Buying Candies With Discount
Determine if two strings are anagrams of each other, meaning they contain the same characters in a different order. You need to check if one string can be rearranged to form the other.
#2. Valid Anagram
Determine if a given array of positive integers is considered "good". An array is "good" if you can obtain 1 by taking the greatest common divisor (GCD) of all the numbers in a subsequence of the array.
#3. Check If It Is a Good Array
Page 1 of 1 · 8 total