반응형

알고리즘풀이

    [LeetCode] 70. Climbing Stairs - Java

    https://leetcode.com/problems/climbing-stairs/ Climbing Stairs - 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 문제 You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Exam..

    [LeetCode] 238. Product of Array Except Self - Java

    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

    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

    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

    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..

반응형