Showing 3 of 6 questions
Find the k most frequent elements in a given array of numbers. Return the top k elements based on their frequency.
#1. Top K Frequent Elements
A robot follows a sequence of instructions (move and rotate). Determine if the robot ends up back at its starting point, or if it's trapped in a repeating circular path.
#2. Robot Bounded In Circle
Determine if a string containing parentheses is valid. A valid string has matching and properly nested opening and closing parentheses.
#3. Valid Parentheses