**Notice**

**Recent Posts**

**Recent Comments**

**Link**

**관리 메뉴**

## 목록전체 글 (76)

## .Zzumbong

**[leetCode/JS] 13. Roman to Integer**

문제 설명 Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, 2 is written as II in Roman numeral, just two ones added together. 12 is written as XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + II. Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII. Instead,..

**[leetCode/JS] 5. Longest Palindromic Substring**

문제 설명 Given a string s, return the longest palindromic substring in s. palindromic: A string is palindromic if it reads the same forward and backward. 입출력 예 Example 1: Input: s = "babad" Output: "bab" Explanation: "aba" is also a valid answer. Example 2: Input: s = "cbbd" Output: "bb" Constraints 1 0; i--) { for(let j = 0; j answer.length){ const word = s.slice(j, i); ..

**[leetCode/JS] 224. Basic Calculator**

문제 설명 Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of the evaluation. Note: You are not allowed to use any built-in function which evaluates strings as mathematical expressions, such as eval(). 입출력 예 Example 1: Input: s = "1 + 1" Output: 2 Example 2: Input: s = " 2-1 + 2 " Output: 3 Example 3: Input: s = "(1+(4+5+2)-3)+(6+8)..

**[leetCode/JS] 2047. Number of Valid Words in a Sentence**

문제 설명 A sentence consists of lowercase letters ('a' to 'z'), digits ('0' to '9'), hyphens ('-'), punctuation marks ('!', '.', and ','), and spaces (' ') only. Each sentence can be broken down into one or more tokens separated by one or more spaces ' '. A token is a valid word if all three of the following are true: It only contains lowercase letters, hyphens, and/or punctuation (no digits). Ther..

**[leetCode/JS] 9. Palindrome Number**

문제 설명 Given an integer x, return true if x is a palindrome, and false otherwise. palindrome : An integer is a palindrome when it reads the same forward and backward. For example, 121 is a palindrome while 123 is not. 입출력 예 Example 1: Input: x = 121 Output: true Explanation: 121 reads as 121 from left to right and from right to left. Example 2: Input: x = -121 Output: false Explanation: From left..

**[lettCode/JS] 36. Valid Sudoku**

문제 설명 Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the digits 1-9 without repetition. Each column must contain the digits 1-9 without repetition. Each of the nine 3 x 3 sub-boxes of the grid must contain the digits 1-9 without repetition. Note: A Sudoku board (partially filled) could be valid but is..

**[leetCode/JS] 9. Palindrome Number**

문제 설명 Given an integer x, return true if x is a palindrome, and false otherwise. palindrome : An integer is a palindrome when it reads the same forward and backward. For example, 121 is a palindrome while 123 is not. 입출력 예 Example 1: Input: x = 121 Output: true Explanation: 121 reads as 121 from left to right and from right to left. Example 2: Input: x = -121 Output: false Explanation: From left..

**[15~22] 8년차 Front-End 개발자의 개발 인생 회고록**

8년 차에 쓰는 첫 개발 회고록 벌써 8년차다. 연차로 치면 8년 차지만 실 근무?로 치면 만 6년 경력으로 주니어는 아니지만 확실히 시니어입니다!라고 하기엔 애매한 상황이다. 시니어와 비교하면 역시나 부족하겠지만 나름 시스템과 프레임워크에 대한 이해나 패키지 개발이나 다양한 프로젝트를 소화하다 보니 실력이 늘어서 자신감은 있지만 성격상 흔히 말하는 찐개발자들이 많기 때문에 항상 겸손하게 일하고 있다. 1. 2015 - 2016 컴공이랑 이름만 다른 컴퓨터 과학을 전공해 14년도 졸업 이후 갈피를 못 잡던 시기에 비개발직군에 취업했다. 현대 1차 밴드 협력업체라는 좋은 타이틀이 있던 전산지원부라는 당시엔 생소한 부서에 입사하였다. 회사 내에 컴퓨터 조달, 수리, 관리 뭐 그런 것도 하고 가끔 자체 프로그..

**[leetCode/JS] 587. Erect the Fence**

문제 설명 You are given an array trees where trees[i] = [xi, yi] represents the location of a tree in the garden. You are asked to fence the entire garden using the minimum length of rope as it is expensive. The garden is well fenced only if all the trees are enclosed. Return the coordinates of trees that are exactly located on the fence perimeter. 입출력 예 Example 1: Input: points = [[1,1],[2,2],[2,0]..

**[leetCode/JS] 696. Count Binary Substrings**

문제 설명 Given a binary string s, return the number of non-empty substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively. Substrings that occur multiple times are counted the number of times they occur. 입출력 예 Example 1: Input: s = "00110011" Output: 6 Explanation: There are 6 substrings that have equal number of consecutive ..

**[leetCode/JS] 1360. Number of Days Between Two Dates**

문제 설명 Write a program to count the number of days between two dates. The two dates are given as strings, their format is YYYY-MM-DD as shown in the examples. 입출력 예 Example 1: Input: date1 = "2019-06-29", date2 = "2019-06-30" Output: 1 Example 2: Input: date1 = "2020-01-15", date2 = "2019-12-31" Output: 15 Constraints The given dates are valid dates between the years 1971 and 2100. 내 솔루션 차이 나는 일자..

**[leetCode/JS] 263. Ugly Number**

문제 설명 An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5. Given an integer n, return true if n is an ugly number. 입출력 예 Example 1: Input: n = 6 Output: true Explanation: 6 = 2 × 3 Example 2: Input: n = 1 Output: true Explanation: 1 has no prime factors, therefore all of its prime factors are limited to 2, 3, and 5. Example 3: Input: n = 14 Output: false Explanati..

**[leetCode/JS] 223. Rectangle Area**

문제 설명 Given the coordinates of two rectilinear rectangles in a 2D plane, return the total area covered by the two rectangles. The first rectangle is defined by its bottom-left corner (ax1, ay1) and its top-right corner (ax2, ay2). The second rectangle is defined by its bottom-left corner (bx1, by1) and its top-right corner (bx2, by2). 입출력 예 Example 1: Input: ax1 = -3, ay1 = 0, ax2 = 3, ay2 = 4, ..

**[leetCode/JS] 1975. Maximum Matrix Sum**

문제 설명 You are given an n x n integer matrix. You can do the following operation any number of times: Choose any two adjacent elements of matrix and multiply each of them by -1. Two elements are considered adjacent if and only if they share a border. Your goal is to maximize the summation of the matrix's elements. Return the maximum sum of the matrix's elements using the operation mentioned above..

**[leetCode/JS] 374. Guess Number Higher or Lower**

문제 설명 We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wrong, I will tell you whether the number I picked is higher or lower than your guess. You call a pre-defined API int guess(int num), which returns three possible results: -1: Your guess is higher than the number I picked (i.e. num > pick). 1: Yo..

**[leetCode/JS] 1721. Swapping Nodes in a Linked List**

문제 설명 You are given the head of a linked list, and an integer k. Return the head of the linked list after swapping the values of the k^th node from the beginning and the k^th node from the end (the list is 1-indexed). 입출력 예 Example 1: Input: head = [1,2,3,4,5], k = 2 Output: [1,4,3,2,5] Example 2: Input: head = [7,9,6,6,7,8,3,0,9,5], k = 5 Output: [7,9,6,6,8,7,3,0,9,5] Constraints The number of ..

**[leetCode/JS] 1700. Number of Students Unable to Eat Lunch**

문제 설명 The school cafeteria offers circular and square sandwiches at lunch break, referred to by numbers 0 and 1 respectively. All students stand in a queue. Each student either prefers square or circular sandwiches. The number of sandwiches in the cafeteria is equal to the number of students. The sandwiches are placed in a stack. At each step: If the student at the front of the queue prefers the..

**[leetCode/JS] 3. Longest Substring Without Repeating Characters**

문제 설명 Given a string s, find the length of the longest substring without repeating characters. 입출력 예 Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2: Input: s = "bbbbb" Output: 1 Explanation: The answer is "b", with the length of 1. Example 3: Input: s = "pwwkew" Output: 3 Explanation: The answer is "wke", with the length of 3. Notice ..

**[leetCode/JS] 222. Count Complete Tree Nodes**

문제 설명 Given the root of a complete binary tree, return the number of the nodes in the tree. According to Wikipedia, every level, except possibly the last, is completely filled in a complete binary tree, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes inclusive at the last level h. Design an algorithm that runs in less than O(n) time complexity. 입출력..

**[leetCode/JS] 2. Add Two Numbers**

문제 설명 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. 입출력 예 Example 1: Input: l1 = [2,4,3], l2 = [5,6,4] Output: [7,0,8] Explan..