본문 바로가기

👨‍💻 LeetCode15

[leetcode/JS] 122_Best Time to Buy and Sell Stock II 풀이 🎲 문제 Best Time to Buy and Sell Stock II - 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 122. Best Time to Buy and Sell Stock II Medium price[i]가 i번째 날의 주어진 주식 가격인 정수 배열 price가 주어집니다. 매일 주식을 매수 및 / 또는 매도하기로 결정할 수 있습니다. 언제든지 최대 한 주식만 보유할 수 있습니다. 단, 매수 후 당일 매도가 가능합니다. 달성할 수 있는 최대 이익.. 2022. 11. 16.
[leetcode/JS] 744_Find Smallest Letter Greater Than Target 풀이 🎲 문제 Find Smallest Letter Greater Than Target - 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 744. Find Smallest Letter Greater Than Target Easy 내림차순으로 정렬된 "letters" 문자 배열과 "target" 문자가 제공됩니다. "letters"에는 적어도 두 개의 다른 문자가 있습니다. 사전 순으로 "target"보다 큰 "letters"에서 가장 작은 문자를 반환합니다. 이러한 .. 2022. 11. 16.
[leetcode/JS] 278_First Vad Version 풀이 🎲 문제 First Bad Version - 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 278. First Bad Version Easy 당신은 제품 관리자이며 현재 새 제품을 개발하는 팀을 이끌고 있습니다. 안타깝게도 최신 버전의 제품은 품질 검사에 실패했습니다. 각 버전은 이전 버전을 기반으로 개발되기 때문에 나쁜 버전 이후의 모든 버전도 나쁜 것입니다. n개의 버전 [1, 2, ..., n]이 있고 첫 번째 잘못된 버전을 찾고자 한다고 가정합니다. 버전.. 2022. 11. 16.
[leetcode/JS] 2_Add Two Numbers 풀이 🎲 문제 Add Two Numbers - 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 2. Add Two Numbers Medium 음수가 아닌 두 정수를 나타내는 비어 있지 않은 연결 목록이 두 개 제공됩니다. 숫자는 역순으로 저장되며 각 노드는 하나의 숫자를 포함합니다. 두 숫자를 더하고 합계를 연결 리스트로 돌려주세요. 숫자 0 자체를 제외하고 두 숫자가 선행 0을 포함하지 않는다고 가정할 수 있습니다. 더보기 You are given two non-em.. 2022. 11. 13.
[leetcode/JS] 27_Remove Element 풀이 🎲 문제 Remove Element - 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 27. Remove Element Easy 정수 배열 "nums"와 정수 "val"이 주어지면 "nums"에서 발생하는 모든 "val"을 제거합니다. 요소의 상대적 순서는 변경될 수 있습니다. 일부 언어에서는 배열의 길이를 변경할 수 없으므로, 대신 배열의 첫 번째 부분인 "nums"에 결과를 배치해야 합니다. 더 형식적으로, 중복을 제거한 후에 "k" 요소가 있다면, "num.. 2022. 11. 13.
[leetcode/JS] 20_Valid Parentheses 풀이 🎲 문제 Valid Parentheses - 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 20. Valid Parentheses Easy '(', ')', '{', '}', '[' , ']' 문자만 포함하는 문자열 s 가 주어지면 입력 문자열이 유효한지 확인합니다. 다음과 같은 경우 입력 문자열이 유효합니다. 열린 브래킷은 동일한 유형의 브래킷으로 닫아야 합니다. 열린 브래킷은 올바른 순서로 닫아야 합니다. 모든 닫기 브래킷에는 동일한 유형의 해당 여는 브래킷.. 2022. 11. 13.