본문 바로가기

LeetCode/코딩 테스트 스터디 2주차12

[LeetCode] 26. Remove Duplicates from Sorted Array 풀이 (JS) 0. 문제 https://leetcode.com/problems/remove-duplicates-from-sorted-array/ Remove Duplicates from Sorted Array - 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 중복을 제거한 배열 원소의 수를 구하고 기존 배열의 순서대로 해당 값을 나열하는 문제 #1 Input: nums = [1,1,2] Output: 2, nums = [1,2,_] Explanation: Your functi.. 2022. 7. 17.
[LeetCode] 5. Longest Palindromic Substring 풀이 (JS) 0. 문제 https://leetcode.com/problems/longest-palindromic-substring/ Longest Palindromic Substring - 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 문자열이 주어지면 가장 긴 회문 부분을 반환하는 문제 #1 Input: s = "babad" Output: "bab" #2 Input: s = "cbbd" Output: "bb" 1.언어 자바스크립트(JavaScript) 2. 문제 풀이 co.. 2022. 7. 17.
[LeetCode] 21. Merge Two Sorted Lists 풀이 (JS) 0. 문제 https://leetcode.com/problems/merge-two-sorted-lists/ Merge Two Sorted Lists - 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 두 개의 정렬된 정수 리스트를 입력받아, 두 리스트를 이용하여 하나의 정렬된 리스트 #1 Input: list1 = [1,2,4], list2 = [1,3,4] Output: [1,1,2,3,4,4] #2 Input: list1 = [], list2 = [] Outp.. 2022. 7. 17.
[LeetCode] 20. Valid Parentheses 풀이 (JS) 0. 문제 https://leetcode.com/problems/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 주어진 문자열에서 에서 괄호가 순서대로 닫혔는지 여부를 확인하여 반환하는 문제 #1 Input: s = "()" Output: true #2 Input: s = "()[]{}" Output: true #3 Input: s = "(]" Output: false 1.언어 자바스크립트(Ja.. 2022. 7. 17.