목록분류 전체보기 (48)
킴의 레포지토리
📑 1. 문제 이해 https://leetcode.com/problems/sort-list/?envType=study-plan-v2&envId=top-interview-150 Sort List - LeetCode Can you solve this real interview question? Sort List - Given the head of a linked list, return the list after sorting it in ascending order. Example 1: [https://assets.leetcode.com/uploads/2020/09/14/sort_list_1.jpg] Input: head = [4,2,1,3] Output: [1, leetcode.com 💡 2. 알고리즘 설계..
📑 1. 문제 이해 https://leetcode.com/problems/search-in-rotated-sorted-array/?envType=study-plan-v2&envId=top-interview-150 Search in Rotated Sorted Array - LeetCode Can you solve this real interview question? Search in Rotated Sorted Array - There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your function, nums is possibly rotated at an unknown ..
📑 1. 문제 이해 https://leetcode.com/problems/find-peak-element/?envType=study-plan-v2&envId=top-interview-150 Find Peak Element - LeetCode Can you solve this real interview question? Find Peak Element - A peak element is an element that is strictly greater than its neighbors. Given a 0-indexed integer array nums, find a peak element, and return its index. If the array contains multiple peaks, leetco..
📑 1. 문제 이해 https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/?envType=study-plan-v2&envId=top-interview-150 Find Minimum in Rotated Sorted Array - LeetCode Can you solve this real interview question? Find Minimum in Rotated Sorted Array - Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] might b..
📑 1. 문제 이해 https://leetcode.com/problems/valid-anagram/?envType=study-plan-v2&envId=top-interview-150 Valid Anagram - LeetCode Can you solve this real interview question? Valid Anagram - Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using leetcode.com 이..
📑 1. 문제 이해 https://leetcode.com/problems/ransom-note/?envType=study-plan-v2&envId=top-interview-150 Ransom Note - LeetCode Can you solve this real interview question? Ransom Note - Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine and false otherwise. Each letter in magazine can only be used once in ranso leetcode.com 이 문제는..
📑 1. 문제 이해 https://leetcode.com/problems/contains-duplicate-ii/ Contains Duplicate II - LeetCode Can you solve this real interview question? Contains Duplicate II - Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) bool: if k == 0: return False d = defaultdict(list) for i, x in enumerate(nu..
📑 1. 문제 이해 https://leetcode.com/problems/two-sum/?envType=study-plan-v2&envId=top-interview-150 Two Sum - LeetCode Can you solve this real interview question? 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 leetcode.com 정렬되어 있지 않은 배열의..
📑 1. 문제 이해 https://leetcode.com/problems/evaluate-reverse-polish-notation/ Evaluate Reverse Polish Notation - LeetCode Can you solve this real interview question? Evaluate Reverse Polish Notation - You are given an array of strings tokens that represents an arithmetic expression in a Reverse Polish Notation [http://en.wikipedia.org/wiki/Reverse_Polish_notation]. Evaluate t leetcode.com 후위 표현식을 계..
📑 1. 문제 이해 https://leetcode.com/problems/min-stack/?envType=study-plan-v2&envId=top-interview-150 Min Stack - LeetCode Can you solve this real interview question? Min Stack - Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class: * MinStack() initializes the stack object. * void push(int val) pushes t leetcode.com 이 문제는 특별한..