- Today
- Total
목록스터디 (250)
작심삼일

문제 링크: https://leetcode.com/problems/rotate-image/ 문제 You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation. 조건 n == matrix.length == matrix[i].length 1
문제 링크: https://leetcode.com/problems/number-of-islands/ 문제 Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. 조건 m == grid.length n == grid[i].length 1
문제 링크: https://leetcode.com/problems/ransom-note/ Ransom Note - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 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..
문제 링크: https://leetcode.com/problems/power-of-three/ 문제 Given an integer n, return true if it is a power of three. Otherwise, return false. An integer n is a power of three, if there exists an integer x such that n == $3^x$. 조건 $-2^{31}$ 1: remain = n % 3 if remain > 0: return False n = n // 3 return True
문제 링크: https://leetcode.com/problems/reduce-array-size-to-the-half/ 문제 You are given an integer array arr. You can choose a set of integers and remove all the occurrences of these integers in the array. Return the minimum size of the set so that at least half of the integers of the array are removed. 조건 2
문제 링크: https://leetcode.com/problems/unique-morse-code-words/ 문제 International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: 'a' maps to ".-", 'b' maps to "-...", 'c' maps to "-.-.", and so on. For convenience, the full table for the 26 letters of the English alphabet is given below: [".-","-...","-.-.","-..",".","..-.","--.","......
문제 링크: https://leetcode.com/problems/first-unique-character-in-a-string/ 문제 Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1. 조건 1
문제 링크: https://leetcode.com/problems/validate-binary-search-tree/ 문제 Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains only nodes with keys greater than the node's key. Both the left and right subtrees must ..