profile
You only get one life. It's actually your duty to live it as fully as possible.
post-thumbnail

Leetcode - Best Time to Buy and Sell Stock

Problem 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. prices라는 배열이 주어지고 prices[i] 는 ith 날의 주가 일때 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 achi

2022년 2월 1일
·
0개의 댓글
·
post-thumbnail

Leetcode - Richest Customer Wealth

Problem Richest Customer Wealth You are given an m x n integer grid accounts where accountsi is the amount of money the ith customer has in the jth bank. Return the wealth that the richest customer has. m x n 형태의 정수로 이루어진 2중배열 accounts이 주어졌을 때, accountsi는 ith 손님이 jth 은행에 가지고 있는 돈의 액수다 가장 돈이 많은 손님의 재산의 금액을 구하시오 A customer's wealth is the amount of money they have in all their bank accounts. Th

2022년 1월 31일
·
0개의 댓글
·
post-thumbnail

Leetcode - Valid Mountain Array

Problem Valid Mountain Array Given an array of integers arr, return true if and only if it is a valid mountain array. 주어진 정수 배열이 산 배열이면 true를 반환하시오 Recall that arr is a mountain array if and only if: 다음 경우에만 산 배열이라는 것을 기억할 것 arr.length >= 3 There exists some i with 0 arr[i + 1] > ... > arr[arr.length - 1] ![](https://images.

2022년 1월 25일
·
0개의 댓글
·
post-thumbnail

LeetCode - Valid Parentheses

Problem Valid Parentheses Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Example 1: ####Example 2: Example 3: Constraints: 1 <= s.length <= 104 s consists of parentheses only '()[]{}'. Solution

2021년 12월 20일
·
0개의 댓글
·
post-thumbnail

Leetcode - Two Sum

Problem 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. 정수로 이루어진 배열과, 목표 정수가 주어질 때, 둘이 합하여서 목표 정수가 되는 배열의 인덱스를 반환하라 각 입력에 정확히 하나의 해결법만 존재 한다고 가정하며, 하나의 요소를 2번 사용할 수 없다. 반환값의 순서는 중요하지 않다 Example 1:

2021년 11월 8일
·
0개의 댓글
·