Company: apple
All the problems asked by "apple".
-
Leetcode 167 - Two Sum II - Input Array Is Sorted
Given a sorted array, find two numbers such that they add up to a specific target number, and return their indices.
-
LeetCode 36 - Valid Sudoku
Determine if a 9x9 Sudoku board is valid based on specific rules for rows, columns, and 3x3 sub-boxes.
-
LeetCode 1431 - Kids With the Greatest Number of Candies
Determine if each child can have the greatest number of candies after giving them extra candies.
-
Leetcode 347 - Top K Frequent Elements
Given an integer array and an integer k, find the k most frequent elements in the array.
-
Leetcode 242 - Valid Anagram
Given two strings s and t, return true if t is an anagram of s, and false otherwise.
-
Leetcode 15 - 3Sum
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. The solution set must not contain duplicate triplets.
-
Leetcode 152 - Maximum Product Subarray
Given an integer array nums, find a subarray that has the largest product, and return the product.
-
Leetcode 217 - Contains Duplicate
Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.
-
Leetcode 238 - Product of Array Except Self
Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].
-
Leetcode 33 - Search in Rotated Sorted Array
Given the array nums after the possible rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums.
-
Leetcode 167 - Two Sum II
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.