[LeetCode] 238. Product of Array Except Self - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/product-of-array-except-self/ Product of Array Except Self - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 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] 121. Best Time to Buy and Sell Stock - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ 문제 You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, ret..
[LeetCode] 217. Contains Duplicate - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/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. Example 1: Input: nums = [1,2,3,1] Output: true Example 2: Input: nums = [1,2,3,4] Output: false Example 3: Input: nums = [1,1,1,3,3,4,3,2,4,2] Output: true Constraints: 1
[LeetCode] 1. Two Sum - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/two-sum/ 문제 Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. Example 1: Input: nums = [2,7,11,15], target = 9 Output: [0,1] Explanation: Because nu..
HYOJUN
'알고리즘/LeetCode' 카테고리의 글 목록 (17 Page)