Showing 3 of 6 questions
You're given counts of 'A', 'B', and 'AB' strings. Combine them to construct the longest possible string where no two adjacent characters are the same.
#1. Construct the Longest New String
You're given a grid where some cells have stones and others are empty. Find the minimum number of moves to redistribute the stones so that each cell has exactly one stone.
#2. Minimum Moves to Spread Stones Over Grid
You're given a binary tree. Determine the minimum number of swaps needed at each level to sort the node values in ascending order.
#3. Minimum Number of Operations to Sort a Binary Tree by Level
Page 1 of 1 · 6 total