Leetcode

    5/24 수 [LeetCode #36] 유효한 스도쿠 TIL

    5/24 수 [LeetCode #36] 유효한 스도쿠 TIL

    [LeetCode] 36. Valid SudokuValid Sudoku - LeetCodeCan you solve this real interview question? 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: 1. Each row must contain the digits 1-9 without repetition. 2. Each column must contain the digits 1-9 without repetition. 3. Each of the nine 3 x 3 sub-boxes of the gr..

    5/22 월 [LeetCode #347] K개의 최빈값 TIL

    5/22 월 [LeetCode #347] K개의 최빈값 TIL

    [LeetCode] 347. Top K Frequent ElementsTop K Frequent Elements - LeetCodeCan you solve this real interview question? Top K Frequent Elements - Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input: nums = [1], k = 1 Output: [1] Constraints: * 1

    5/19 금 [LeetCode #1] 투썸 TIL

    5/19 금 [LeetCode #1] 투썸 TIL

    [LeetCode] 1. Two SumTwo Sum - LeetCodeCan 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 use the same element twice. You can return the answer in any order. Example 1: Input: nums = [2,7,11,15..

    5/18 목 [LeetCode #242] 유효한 아나그램 TIL

    5/18 목 [LeetCode #242] 유효한 아나그램 TIL

    [LeetCode] 242. Valid AnagramValid Anagram - LeetCodeCan 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 all the original letters exactly once. Example 1: Input: s = "anagram", t = "nagaram" Ou..

    5/12 금 [LeetCode #118] 파스칼의 삼각형 TIL

    5/12 금 [LeetCode #118] 파스칼의 삼각형 TIL

    [LeetCode] 118. Pascal's TrianglePascal's Triangle - LeetCodeCan you solve this real interview question? Pascal's Triangle - Given an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it as shown: [https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif] Example 1: Input: numRows ..

    5/10 수 [LeetCode #217] 배열에 중복되는 값이 있으면 true 반환하기 TIL

    5/10 수 [LeetCode #217] 배열에 중복되는 값이 있으면 true 반환하기 TIL

    [LeetCode] 217. Contains DuplicateContains Duplicate - LeetCodeCan you solve this real interview question? Contains Duplicate - Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. Example 1: Input: nums = [1,2,3,1] Output: true Example 2: Input: nums = [1,2,3,4] Output: false Example 3: Input: nums = [1,1,1,3,3..

    5/9 화 [LeetCode #26] 순서를 유지하여 배열에서 중복 숫자 제거하기 TIL

    5/9 화 [LeetCode #26] 순서를 유지하여 배열에서 중복 숫자 제거하기 TIL

    [LeetCode] 26. Remove Duplicates from Sorted ArrayRemove Duplicates from Sorted Array - LeetCodeCan you solve this real interview question? Remove Duplicates from Sorted Array - Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place [https://en.wikipedia.org/wiki/In-place_algorithm] such that each unique element appears only once. The relative order of the ele..