목록study/algorithm (37)
킴의 레포지토리
📑 1. 문제 이해 https://leetcode.com/problems/linked-list-cycle/?envType=study-plan-v2&envId=top-interview-150 Linked List Cycle - LeetCode Can you solve this real interview question? 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 continuo leetco..
📑 1. 문제 이해 https://leetcode.com/problems/add-two-numbers/?envType=study-plan-v2&envId=top-interview-150 Add Two Numbers - LeetCode Can you solve this real interview question? 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 leetcode.co..
📑 1. 문제 이해 https://leetcode.com/problems/longest-substring-without-repeating-characters/?envType=study-plan-v2&envId=top-interview-150 0 이라면 중복된 문자이므로 duplicated를 1 증가시킵니다. duplicated가 0이라면 부분 문자열에 중복된 문자가 없다는 의미로 max_len을 갱신해줍니다. 단, 이전에 발견된 max_len보다 큰 경우에만 갱신해 줍니다. 4. 만약 새롭게 추가된 문자가 중복된 문자라면, 중복된 문자를 제거할때까지 포인터 l을 오른쪽으로 한칸씩 움직입니다. 5. max_len을 반환합니다. 빈 문자열의 경우, max_len이 갱신되지 않은 채로 남아있기 때문에 0을 반..
📑 1. 문제 이해 https://leetcode.com/problems/search-a-2d-matrix/description/?envType=study-plan-v2&envId=top-interview-150 Search a 2D Matrix - LeetCode Can you solve this real interview question? Search a 2D Matrix - You are given an m x n integer matrix matrix with the following two properties: * Each row is sorted in non-decreasing order. * The first integer of each row is greater than the last i..
📑 1. 문제 이해 https://leetcode.com/problems/minimum-size-subarray-sum/?envType=study-plan-v2&envId=top-interview-150 Minimum Size Subarray Sum - LeetCode Can you solve this real interview question? Minimum Size Subarray Sum - Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. If there is no su..
📑 1. 문제 이해 https://leetcode.com/problems/search-insert-position/?envType=study-plan-v2&envId=top-interview-150 Search Insert Position - LeetCode Can you solve this real interview question? Search Insert Position - Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You must..
📑 1. 문제 이해 https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/?envType=study-plan-v2&envId=top-interview-150 Two Sum II - Input Array Is Sorted - LeetCode Can you solve this real interview question? Two Sum II - Input Array Is Sorted - Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific targe..
📑 1. 문제 이해 https://leetcode.com/problems/valid-palindrome/?envType=study-plan-v2&envId=top-interview-150 Valid Palindrome - LeetCode Can you solve this real interview question? Valid Palindrome - A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric cha leetcode..
문제 https://leetcode.com/problems/jump-game/?envType=study-plan-v2&envId=top-interview-150 Jump Game - LeetCode Can you solve this real interview question? Jump Game - You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position. Return true if you can leetcode.com You are given an ..
문제 https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/?envType=study-plan-v2&envId=top-interview-150 Best Time to Buy and Sell Stock II - LeetCode Can you solve this real interview question? Best Time to Buy and Sell Stock II - You are given an integer array prices where prices[i] is the price of a given stock on the ith day. On each day, you may decide to buy and/or sell the stock..