Showing 12 questions
Determine if a number is a 'happy number'. A happy number eventually reaches 1 when replaced by the sum of the squares of its digits, repeating the process until it does.
#1. Happy Number
You are given an array where each element represents your maximum jump length at that position. Determine if you can reach the last index starting from the first index.
#2. Jump Game
You are given a list of words. Find the longest possible chain of words where each word is formed by adding exactly one letter to its predecessor.
#3. Longest String Chain
You are given a set of points in the plane. Find the minimum area of any rectangle formed by these points, where the rectangle's sides are not necessarily parallel to the x and y axes.
#4. Minimum Area Rectangle II
You're given an array that's supposedly a doubled version of another array. Your task is to reconstruct the original array from this doubled array, if possible.
#5. Find Original Array From Doubled Array
You're given a secret word and a list of possible guesses. Your goal is to guess the secret word by making a limited number of guesses and receiving feedback on how many letters match in the correct positions.
#6. Guess the Word
Find the kth largest element in an unsorted array. Note that it is the kth largest element in sorted order, not the kth distinct element.
#7. Kth Largest Element in an Array
Given a list of words, group together all the anagrams. Anagrams are words that contain the same letters rearranged.
#8. Group Anagrams
Find the minimum number of moves a knight needs to reach a target position on an infinite chessboard, starting from (0, 0).
#9. Minimum Knight Moves
You are given a collection of video clips and a target duration. Determine the minimum number of clips needed to cover the entire duration from start to finish by stitching them together.
#10. Video Stitching
You're given a list of recipes and available ingredients. Determine which recipes can be made using only the given supplies and return them in any order.
#11. Find All Possible Recipes from Given Supplies
Given a set of points in the plane, find the minimum area of a rectangle formed by these points that has sides parallel to the x and y axes. If no such rectangle exists, return 0.
#12. Minimum Area Rectangle