K Closest Points to Origin
Given a list of points, return the k closest points to the origin (0, 0).
Given a list of points, return the k closest points to the origin (0, 0).
Given an array of integers, nums, and a value k, return the kth largest element.
This question is asked by Amazon. You are given a group of stones, all of which have a positive weight. At each turn, we select the heaviest two stones and smash them together. When smashing these two stones together, one of two things can happen:
This question is asked by Facebook. Given a string, check if it can be modified such that no two adjacent characters are the same. If it is possible, return any string that satisfies this condition and if it is not possible return an empty string.
Given a list of words, return the top k frequently occurring words.