- Today
- Total
목록분류 전체보기 (384)
작심삼일
문제 링크: https://leetcode.com/problems/simplify-path/ 문제 Given a string path, which is an absolute path (starting with a slash '/') to a file or directory in a Unix-style file system, convert it to the simplified canonical path. In a Unix-style file system, a period '.' refers to the current directory, a double period '..' refers to the directory up a level, and any multiple consecutive slashes (i..
문제 링크: https://leetcode.com/problems/rotate-list/ 문제 Given the head of a linked list, rotate the list to the right by k places. 조건 The number of nodes in the list is in the range [0, 500]. -100
문제 링크: https://leetcode.com/problems/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. 조건 The number of nodes..
문제 링크: https://leetcode.com/problems/linked-list-cycle/ 문제 Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote the index of the node that tail's next pointer is connected to. Note that pos is..
문제 링크: https://leetcode.com/problems/merge-two-sorted-lists/ 문제 You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list. 조건 The number of nodes in both lists is in the range [0, 50]. -100
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/zYVGg/btruYTSvc0Y/CLTiAeS80KpO4WJK34fhLk/img.png)
문제 링크: https://leetcode.com/problems/champagne-tower/ 문제 We stack glasses in a pyramid, where the first row has 1 glass, the second row has 2 glasses, and so on until the $100^{th}$ row. Each glass holds one cup of champagne. Then, some champagne is poured into the first glass at the top. When the topmost glass is full, any excess liquid poured will fall equally to the glass immediately to the l..
문제 링크: https://leetcode.com/problems/arithmetic-slices/ 문제 An integer array is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same. For example, [1,3,5,7,9], [7,7,7,7], and [3,-1,-5,-9] are arithmetic sequences. Given an integer array nums, return the number of arithmetic subarrays of nums. A subarray is a contiguous ..
문제 링크: https://leetcode.com/problems/is-subsequence/ 문제 Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence of a string is a new string that is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (i.e., "ace" is a subsequence of "abcde" while "aec" ..