Showing 3 questions
Given an array of numbers, rearrange it to maximize the number of indices where array[i] < rearranged_array[i]. Essentially, you want to maximize how many numbers in the array can be replaced by a strictly larger number from within the same array.
#1. Maximize Greatness of an Array
Determine if a binary tree is univalued, meaning every node has the same value. You need to check if all nodes in the tree contain the same value.
#2. Univalued Binary Tree
You're given a date string in a specific format (e.g., "20th Oct 2052") and need to convert it to a standardized format (YYYY-MM-DD).
#3. Reformat Date